Click here to Skip to main content
15,891,777 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionrunning website (asp.net) on 3rd party server. Pin
jeshra2793-Feb-10 0:44
jeshra2793-Feb-10 0:44 
AnswerRe: running website (asp.net) on 3rd party server. Pin
sashidhar3-Feb-10 1:08
sashidhar3-Feb-10 1:08 
QuestionPage Loading with two update panels Pin
Hema Bairavan3-Feb-10 0:40
Hema Bairavan3-Feb-10 0:40 
AnswerRe: Page Loading with two update panels Pin
Pranay Rana3-Feb-10 0:43
professionalPranay Rana3-Feb-10 0:43 
QuestionRe: Page Loading with two update panels Pin
Hema Bairavan3-Feb-10 1:13
Hema Bairavan3-Feb-10 1:13 
AnswerRe: Page Loading with two update panels Pin
Pranay Rana3-Feb-10 1:17
professionalPranay Rana3-Feb-10 1:17 
QuestionSQL Server Express doesn't work Pin
hezi3-Feb-10 0:26
hezi3-Feb-10 0:26 
AnswerRe: SQL Server Express doesn't work Pin
Alaric Dailey10-Feb-10 3:06
Alaric Dailey10-Feb-10 3:06 
If you are using the the App_Data directory under a Web application then you should be using the |DataDirectory| functionality. Then you don't need to do the Server.MapPath yourself.

On first glance it looks like your SQLEXPRESS instance doesn't have permission to the data directory, the directory doesn't exist, or the file doesn't exist.

But upon closer inspection, you want to remove the setting "User Instance=false" that is going to try to mount the database differently than what you are trying to accomplish. For more information read this.

That being said, having your web app be able to create files, even database files in your sites directories, or even anywhere other than the temp directory is a huge security risk. Consequently, your "CREATE DATABASE" looks to be expected behavior.

One final note:
ASP.NET defines a connectionstring called "LocalSqlServer" in the machine.config, thus it is inherited by all asp.net websites, the default concection string is
data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true


which is nearly identical to your connection string (once the user instance bit is corrected), and the structure of that particular database provides support for all the normal user, password, and permission templates that .NET provides.
GeneralRe: SQL Server Express doesn't work Pin
hezi14-Feb-10 1:41
hezi14-Feb-10 1:41 
GeneralRe: SQL Server Express doesn't work Pin
Alaric Dailey14-Feb-10 4:12
Alaric Dailey14-Feb-10 4:12 
Questionwant to avoid losing data of previous screen Pin
anilaabc3-Feb-10 0:15
anilaabc3-Feb-10 0:15 
AnswerRe: want to avoid losing data of previous screen Pin
m@dhu3-Feb-10 1:37
m@dhu3-Feb-10 1:37 
AnswerRe: want to avoid losing data of previous screen Pin
Palash Biswas3-Feb-10 17:11
Palash Biswas3-Feb-10 17:11 
AnswerRe: want to avoid losing data of previous screen Pin
ScottM13-Feb-10 21:49
ScottM13-Feb-10 21:49 
QuestionIE refresh message Pin
Subin Mavunkal2-Feb-10 22:48
Subin Mavunkal2-Feb-10 22:48 
AnswerRe: IE refresh message Pin
Dinesh Mani2-Feb-10 23:17
Dinesh Mani2-Feb-10 23:17 
Questionhow to update parent window automatically ?? Pin
JC.KaNNaN2-Feb-10 22:16
JC.KaNNaN2-Feb-10 22:16 
AnswerRe: how to update parent window automatically ?? Pin
Dinesh Mani2-Feb-10 23:21
Dinesh Mani2-Feb-10 23:21 
AnswerRe: how to update parent window automatically ?? Pin
Palash Biswas3-Feb-10 17:06
Palash Biswas3-Feb-10 17:06 
Questionconvert aspx to pdf Pin
Subin Mavunkal2-Feb-10 20:47
Subin Mavunkal2-Feb-10 20:47 
AnswerRe: convert aspx to pdf Pin
Abhishek Sur2-Feb-10 21:00
professionalAbhishek Sur2-Feb-10 21:00 
QuestionMessage Removed Pin
2-Feb-10 20:34
kripa212-Feb-10 20:34 
AnswerRe: how to maintain viewstate? Pin
Dinesh Mani2-Feb-10 20:43
Dinesh Mani2-Feb-10 20:43 
GeneralRe: how to maintain viewstate? Pin
kripa212-Feb-10 21:16
kripa212-Feb-10 21:16 
AnswerRe: how to maintain viewstate? Pin
Dinesh Mani2-Feb-10 23:28
Dinesh Mani2-Feb-10 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.