Web app on a web server, but run on localhost

G

Guest

I have a asp.net 2.0 web application created on a mapped web server drive, a
very simple one with only one default page which is blank. But when I run it
inside VS, the URL is http://localhost:1245/. Is this right or not?

ALso the ASP.NET web site administration tool shows error in the Security
tab as:

There is a problem with your selected data store. This can be caused by an
invalid server name or credentials, or by insufficient permission. It can
also be caused by the role manager feature not being enabled. Click the
button below to be redirected to a page where you can choose a new data
store.

The following message may help in diagnosing the problem: An error occurred
during the execution of the SQL file 'InstallCommon.sql'. The SQL error
number is 5110 and the SqlException message is: The file
"I:\WEBAPP\WEBAPP\APP_DATA\ASPNETDB_TMP.MDF" is on a network path that is not
supported for database files. CREATE DATABASE failed. Some file names listed
could not be created. Check related errors. Creating the
ASPNETDB_0899077b243c4138b1775e6c0684c57d database...

Thanks for the help.
 
N

Norman Yuan

You have to know where your web app runs, not where the files stores.
Http://localhost... means you are running your web app on your computer
(especially when you are doing development). The files and web apps virtual
directory, however, could be a network location, which is your case.

As for the database setup error, it is because you are using SQL
Server2005/Express as ASP.NET website's management data store, such as
membershipmanagement. In this case, the data file used by SQL Server/Express
(*.mdf/*.ldf) must be on the computer where SQL Server/Express installs,
i.e. must be on local drive, not on network location. So, most like, your
SQL Server/Express is installed on your development computer, so the
"ASPNETDB_TEMP.MDF" must be on your computer's local hard drive.
 
G

Guest

I opened the app, which stays in the web server, in VS 2005. And I built it
and ran it. I did the same thing in VS2003, and it ran from the web server.
How can I set the app to run from web server, when I am debugging it?

Thanks a lot for your help.
 
B

bruce barker

sqlserver does not support mapped drives for databases. you need to copy
the mdf to a local drive and change the connect string.

-- bruce (sqlwork.com)
 
G

Guest

When you see http://localhost:1245 with a nonstandard port number, that
means your project is configured to run under the built - in development web
server in Visual Studio, NOT "IIS".
you can change the configuration to have it run under IIS in the Properties
tabs.

Be aware that the default SQLExpress arrangement uses the "User Instance"
feature that attaches the physical MDF database file at runtime, but this
*only* works on the same machine.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top