By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,966 Members | 1,463 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,966 IT Pros & Developers. It's quick & easy.

Website Development Problems

P: n/a
Applies to: Visual Studio 2008 Professional

Hi everyone,
I'm in the middle of creating a website with VS2008 and I'm trying to integrate a user registration/login section on the website but I've come up against a small problem. I've configured the database and set up a test user through the ASP.NET Website Administration Tool (Website ASP.NET Configuration), I've created a user registration page and a user login page but when I try to register a test user from the website itself, I'm receiving the following error message - yet I can add a new user without any problems from the Website Administration Tool - but that kind of defeats the point because I want users to be able to self-register through the website. The error message that I see when I test the registration page on the website is:

Failed to update the database because the database is read-only

which doesn't make much sense to me because I can register a new user through the website administration tool which must indicate the database has write permissions and if I drill down to the directory where the database is stored on the website and right-click Properties, it doesn't have a tick in the box for read-only, so I'm a bit confused why I would be getting this error or what I can do to resolve it.

Can anyone offer any suggestions or workarounds please as I don't really know how to solve this problem

Many thanks in advance
Wayne

Sep 7 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
One possible issue:

You should always be aware of which account is running in development and production code.

Here is come crappy code to show you:

Run it in the "not working" scenario and give rights to that user.


private string FindIIdentity()

{
try
{
//'Dim user As WindowsPrincipal =
CType(System.Threading.Thread.CurrentPrincipal, WindowsPrincipal)
//'Dim ident As IIdentity = user.Identity
string returnValue = string.Empty;
WindowsIdentity ident = WindowsIdentity.GetCurrent();
returnValue = ident.Name;
try
{
returnValue += " on " + System.Environment.MachineName;

}
catch (Exception ex)

{

}
return returnValue;
}
"Wayne Smith" <waynesmith1971(NoSpam)@hotmail.comwrote in message news:51**********************************@microsof t.com...
Applies to: Visual Studio 2008 Professional

Hi everyone,
I'm in the middle of creating a website with VS2008 and I'm trying to integrate a user registration/login section on the website but I've come up against a small problem. I've configured the database and set up a test user through the ASP.NET Website Administration Tool (Website ASP.NET Configuration), I've created a user registration page and a user login page but when I try to register a test user from the website itself, I'm receiving the following error message - yet I can add a new user without any problems from the Website Administration Tool - but that kind of defeats the point because I want users to be able to self-register through the website. The error message that I see when I test the registration page on the website is:

Failed to update the database because the database is read-only

which doesn't make much sense to me because I can register a new user through the website administration tool which must indicate the database has write permissions and if I drill down to the directory where the database is stored on the website and right-click Properties, it doesn't have a tick in the box for read-only, so I'm a bit confused why I would be getting this error or what I can do to resolve it.

Can anyone offer any suggestions or workarounds please as I don't really know how to solve this problem

Many thanks in advance
Wayne

Sep 7 '08 #2

P: n/a
You did not say what database you use. I assume that you are very likely using SQL Server Express with ASP.NET membership provider. A common mistake made by most new ASP.NET developer is to jump up the development using SQL Server membership provider (ASP.NET default, and VS makes it so easy) without very basic knowledge/understanding of SQL Server (I can tell from your description, like "if I drill down to the directory where the database is stored on the website and right-click Properties, it doesn't have a tick in the box for read-only...". You do not check/do anything to the database file, it is completely controlled by SQL Server. So you have to make sure your database server SQL Server Express) is set up correctly.

Sorry to say that, but IMO, it is vital to have basic SQL Server knowledge before using it as website membership tool.

"Wayne Smith" <waynesmith1971(NoSpam)@hotmail.comwrote in message news:51**********************************@microsof t.com...
Applies to: Visual Studio 2008 Professional

Hi everyone,
I'm in the middle of creating a website with VS2008 and I'm trying to integrate a user registration/login section on the website but I've come up against a small problem. I've configured the database and set up a test user through the ASP.NET Website Administration Tool (Website ASP.NET Configuration), I've created a user registration page and a user login page but when I try to register a test user from the website itself, I'm receiving the following error message - yet I can add a new user without any problems from the Website Administration Tool - but that kind of defeats the point because I want users to be able to self-register through the website. The error message that I see when I test the registration page on the website is:

Failed to update the database because the database is read-only

which doesn't make much sense to me because I can register a new user through the website administration tool which must indicate the database has write permissions and if I drill down to the directory where the database is stored on the website and right-click Properties, it doesn't have a tick in the box for read-only, so I'm a bit confused why I would be getting this error or what I can do to resolve it.

Can anyone offer any suggestions or workarounds please as I don't really know how to solve this problem

Many thanks in advance
Wayne

Sep 7 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.