473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Website Development Problems

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
2 1599
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Harry Slaughter | last post by:
I've got a client who wants to see some immediate results on a brand new website. within a week, they'd like to see the following: 1) basic user authentication (using php sessions/cookies to...
21
by: Chris | last post by:
I'm trying to get an existing VS.NET project up on my Win2003 server and I get the following error (on the actual website page): "It is an error to use a section registered as...
0
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application...
6
by: Steve Mauldin | last post by:
I have three websites that were developed by using the same code in .net. They are all located under wwwroot on my desktop running windows 2000 pro.because Windows 2000 pro only supports a single...
7
by: vamichael | last post by:
When I try to run the Website Administration Tool from my published application using http://localhost/myapp/webadmin.axd I am getting a "resource not found" error message. I can use the...
2
by: TTT | last post by:
Hi, I have developed a website from the model "Starter kits Classified". Well, the application works good, no problem in my development environment. It uses a SqlServer 2005 express database...
1
by: craigkenisston | last post by:
I can't believe what is happening on my computer right now. I have a web project, file-system based on something like c:\Projects\ProjectX\www\. I had to make some changes and testing in a...
2
by: John_Doe | last post by:
Can anyone clarify what the difference between these two choices is when developing website? I have IIS installed too, so I can pick this too if there is a reason. From the point of view of...
4
by: John Straumann | last post by:
Hello all: Most of my development for websites has been on test VPC images where VS is installed on the server image. I now have a setup where I have a test server joined to my domain, and a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.