views:

311

answers:

1

I'm using a custom security (no membership provider). After the user logs in ... a folder "App_Data" with ASPNETDB.MDF gets automatically created ... on my local machine. If I deploy this to a remote server, it will not work due to security constraints on App_Data.

Even if I delete this folder and restart the application ... it is re-created, even though I removed all references to Membership/Roles/Profile providers ... Nothing used in code ... just the plain old FormsAuthentication.

How is this happening ?

A: 

There must still be a place in your code where Membership/Roles/Profile-service is being used. If the provider is not specified, Asp.Net uses the default => which creates the .mdf file.

Make it impossible in your development environment for the Asp.Net to create the .mdf file: E.g. remove all rights from that App_Data, put in a text file and rename it as ASPNETDB.MDF or something like that...

This way you get the crash in debug mode. Then you can see, what is the line that tries to use the service => which then makes use of the default provider => creates the DB-file.

Ope
welcome on board ... I will give it a try
jalchr
That did work ... I found a reference to the membership in Global.asax file protected void Application_AuthenticateRequest() { if (User != null) Membership.GetUser(true); }
jalchr