More on this.
I never set up sql server on my local client. Apparently this was all
done by vs.net 2005. So membership works with very little info in the
web.config when run from the client.
I suspect my problem is that I on the web server, I don't have
integrated security set up. I suspect whatever windows user vs.net uses
(possibly asp.net) can't access the db without a user and password. All
my other asp.net applications have a user and password in the
connection string.
To further prove this, If I xcopy a working asp.net website that has
the membership login code to the web server, I get connection errors..
using the default web.config. I found some instruction on the net for
creating a connection string, but they assume integrated security.
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer"
connectionString="Data Source=MyServer;
Initial Catalog=appservicesdb;
Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
I was wondering, can the above connection string have a user/password?
or
would it a better approach to somehow allow the asp.net user access to
the DB through windows.. and if so and safe, what's the best way to do
this?
(E-Mail Removed) wrote:
> I've been playing around with new asp.net 2.0 membershp functionality.
>
> I was able to build a simple login form that secures a directory on a
> project I built locally on my development desktop.
>
> However, when I attempt to follow the same steps on the remote test
> server (a website I access via filesystem security accross my lan
> through visual studio ).. I get the following when I attempt to select
> the security tab from the
> administer selection of the login control:
>
> 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
> "\\servername\folder\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_a10a1b7695ae4af7ad287b55252fa7bd database...
>
> To check security, I am from my desktop able to write to the folder and
> add new items from vs.net 2005.
>
> However if I attempt to add new item database under the APP_DATA folder
> through vs.net I get an error that the db file is on a network path
> not support for database files.
>
> How do I correct this? I never knew sqlserver cared where I store data
> files.
>
> The remote server is a win 2000 server and the db is sql server 2000.
>
> Could it be that on the remote webserver/db server I authenticate using
> a sql server login for sa? On my desktop, I think I just default to
> windows authentication. Sorry, noob question, if this is the issue,
> where and how to I tell my project how to connect... and if it is, Im
> wondering why the new ASPNETDB_TMP.MDF requires a different login since
> I did not have to worry about any of this when I tested on my local
> client.
(E-Mail Removed) wrote:
> Since sending the email, I did add the connection string to web.config:
>
> <connectionStrings>
> <remove name="xx.xxx.xx.xx"/>
> <add name="xx.xx.xx.xx"
> connectionString="Data Source=MyServer;
> Initial Catalog=appservicesdb;
> Integrated Security=True"
> providerName="System.Data.SqlClient"/>
> </connectionStrings>
>
> It did not help.
>
> Are you saying the role manager tag might solve this issue? I would
> guess it appears that I can't get sqlserver to wiite a database (using
> the installcommon.sql script) to a share. Seems more like file and
> system security.
>
>
> Incidently, I'm creating the website via the file system (after
> creating a windows share) because If I attempt to create it via http I
> get an error about being unable to create web. At some point I use to
> be able to do that when I was using vs.net 2003.. though I don't see
> anything in windows or IIS security on the server that sould allow me
> to write via http. Perhaps the above goes away If I can create the
> website via http:
>
> Also, I notice on the web server that the websites I create via the
> file system don't have virtual directories like the ones created
> locally via http...
>
> Thank you.
>
>
>
> Cowboy (Gregory A. Beamer) wrote:
> > The membership database location is stored in <connectionstring> section of
> > the web.config. You can find which connection string by looking at the
> > <membership> tag (by name). Also look at the <roleManager> tag.