13 Replies - 1604 Views - Last Post: 01 May 2018 - 08:10 AM Rate Topic: -----

#1 seniorCSGuy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 02-March 18

connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 09:41 AM

Hey,
So I built a web app using webform using .NET, right now I can only run it using visual studio. Is there a way I can run the application without visual studio? For the backend I created an exe but I can run the front end using visual studio only.
Is This A Good Question/Topic? 0
  • +

Replies To: connecting to access database and deploying a ASP.NET on IIS

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 09:44 AM

To clarify - you want a webpage to be an EXE or to run a ASP.NET webpage without IIS/Kestral/etc?
Was This Post Helpful? 0
  • +
  • -

#3 seniorCSGuy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 02-March 18

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 09:51 AM

I dont think an exe is possible, is it?

I want to run the web app/form without visual studio is there a faster way as I need to get it done ASAP
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 09:55 AM

ASP.NET is all about webpages, right? You need a webserver... typically IIS works (often already bundled with any MS OS, or you can do the 'install' for it.. to run locally).. or get a webhosting with IIS.. or azure hub..

.. or in the newer Core1 and 2 you can revamp and package for apache, etc.
https://docs.microso...bs=aspnetcore2x
Was This Post Helpful? 0
  • +
  • -

#5 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 2710
  • View blog
  • Posts: 10,815
  • Joined: 03-December 12

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 10:25 AM

Configure IIS. Move it to the appropriate directory. Start the app pool.
Was This Post Helpful? 0
  • +
  • -

#6 seniorCSGuy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 02-March 18

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 01:21 PM

Can you elaborate. I tried the IIS thing and when I try to open the webform it keeps waiting for localhost.
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 01:39 PM

Unclear what OS you are on, or what you have done... but should be pretty straight forward from the docs.

Example:
https://msdn.microso...2(v=vs.80).aspx
http://www.plus2net....s-localsite.php
Was This Post Helpful? 0
  • +
  • -

#8 seniorCSGuy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 02-March 18

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 05:16 PM

I need to deploy a ASP.NET web app/web form on IIS. The application's front end is connected to an access DB. If I run it on my machine in visual studio and is connected to the DB. I can deploy it on the IIS but it gives me an error "path is not valid" how can I fix it?
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 05:29 PM

It's not advised, but yes. You can use an access db with an asp.net form.

Why is it not working? Hard to say without seeing a project setup, file locations, etc.
Was This Post Helpful? 0
  • +
  • -

#10 seniorCSGuy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 02-March 18

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 05:31 PM

what piece of code would you like to see?
Was This Post Helpful? 0
  • +
  • -

#11 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 05:34 PM

Connection strings.
Was This Post Helpful? 0
  • +
  • -

#12 seniorCSGuy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 02-March 18

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 26 April 2018 - 05:37 PM

    System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection();
            //string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            //string thePath = path + "\\Atos\\Trial.accdb";
            string thePath = "Trial.accdb";
            //connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;" + @"Data source= C:\Users\u\Desktop\basicCRUD\Trial.accdb";
            connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;" + @"Data source= " + thePath;
            string sqlCmd = "SELECT [Language] FROM [Language] WHERE Valid = 'Yes'";

            OleDbCommand cmd = new OleDbCommand(sqlCmd, connection);
            connection.Open();

            System.Data.OleDb.OleDbDataReader reader = cmd.ExecuteReader();
            while(reader.Read())
            {
                lang.Items.Add(reader[0].ToString());
            }
            reader.Close();
            connection.Close();
        }




Was This Post Helpful? 0
  • +
  • -

#13 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 27 April 2018 - 06:45 AM

Remember the path needs to be relative to the webserver's root. I would start there.
Was This Post Helpful? 0
  • +
  • -

#14 Thomas1965   User is offline

  • D.I.C Regular

Reputation: 108
  • View blog
  • Posts: 409
  • Joined: 09-September 16

Re: connecting to access database and deploying a ASP.NET on IIS

Posted 01 May 2018 - 08:10 AM

Why don't you use the AccessDataSource ?
It's much easier to setup.
Normally you should put your database into the App_Data folder.

<asp:AccessDataSource ID="DataSourceID" runat="server" DataFile="~/App_Data/DBName"
  SelectCommand="SELECT [Language] FROM [Language] WHERE Valid = 'Yes' ">
</asp:AccessDataSource>


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1