Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Friday, February 24, 2012

ASPNETDB.MDF is read-only....

Hello everyone.

I am to create a sample site using the club site example. I had a problem with the IIS but now it is solved.

Now i copyied the site to the IIS and it is running. But i cannot access ASPNETDB.MDF. It keep saying that the database is read only... It is not read only!!!

Can any one help me??

System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\NEO\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Thank you in advance.

Iasonas

Try granting the NETWORK SERVICE account R/W access to the contents of your app_data folder (mdf's and ldf's)and the folder itself.

If that doesn't work, please take a look at this post:

http://forums.asp.net/thread/906040.aspx

Why not using search feature in this formus:) Maybe you issue is a common one, then you can find some possible solution by searching the formus rather than just waiting:)

ASPNETDB.MDF is readonly

I have downloaded and installed ASP.NET Ajax Sample applications from

http://ajax.asp.net/default.aspx?tabid=47&subtabid=471

I am trying to run the AJAX TaskList example under C:\Program\Microsoft ASP.NET\ASP.NET AJAX Sample Applications\v1.0.61025\TaskList

First I moved the content of the TaskList folder to a virtual IIS directory, making it possible to debug the website on my local IIS server.

When I run the example I get prompted to Login or register as a new user. When I submit the registration form I receive the following error message:

Failed to update database "C:\INETPUB\WWWROOT\TASKLIST\APP_DATA\ASPNETDB.MDF" because the database is read-only.

How can I modify the permissions forASPNETDB.MDF in order to run the TaskList example.

Thanks

Additional information:

I have installed SQL Server Management Studio Express as I figured this tool might help me to change the permissions. It did not help. I also tried to delete ASPNETDB.mdf, and recreate it by going Website -> Asp.net configuration by adding a new user. I still receive the same error message.

When I point the connection string to a remote SQL database of mine it is possible to register users in ASPNETDB.mdf. But I havn't figured out how to add users using a local version of ASPNETDB.mdf.

I am running Visual Studio on Windows XP. In windows XP you can't just modify permissions for folders as far as I know. I have recently installed SQL Server Management Studio Express as I said before.

I read somewhere that the read/write property for ASPNETDB.mdf may be enabled by checking a box somewhere.

But in SQL Server Management Studio Express tried the following:

*Right click on databases and click attach

*Click Add and select the database ASPNETDB.mdf

*Click OK

*Right Click on the path for ASPNETDB.mdf and click properties

When I click 'Options' under select a page Database Read-Only is already set to false.

If there is not way to use a local version of ASPNETDB.mdf (App_Data folder) I simply have to put up with my remote MS SQL 2005 database. But the subscription fee for this database is outrageous, and therefore I hope that someone might help me and everyone else by providing the appropriate steps to use ASPNETDB.mdf located to the App_Data folder, both on the local IIS server and server side.

Thanks
Svenbro

|||This can be a permission ?issue. Open Management Studio Express->connect to SQL Express instance->go to Security->Logins->make?sure the 'NT AUTHORITY\NETWORK SERVICE' account is there.|||

The 'NT AUTHORITY\NETWORK SERVICE' account is not in the list, but there is a similar item: NT INSTANS\SYSTEM

Should I add 'NT AUTHORITY\NETWORK SERVICE' as a new account with the Windows authentication property checked?

Thanks,

|||NETWORK SERVICE?is?hidden, just type it and click check name in the browse text, you should get it.

Sunday, February 19, 2012

AspAdoComplex Sample Download

Hello,

Does anyone know if there is anywhere on microsoft site that I can download the AspAdoComplex sample?

Thank you,

Hsiao-I

This is sample for Analysis Services 2000. To get it you can install evaluation edition of SQL Server 2000 http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=D20BA6E1-F44C-4781-A6BB-F60E02DC1335

Downloading 267Mb is bit overhead to get a single 12K file:). Unfortunately samples in SQL Server 2000 dont come in form of separate executable.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Thursday, February 16, 2012

ASP.NET Web application, problem connecting to database

Hi,

I have a problem connecting to database using windows authorization.

this is sample code
SqlConnection oSQLConn = new SqlConnection();
oSQLConn.ConnectionString="integrated security=SSPI;Server=SHAREPOINT\\EPM;Database=STS_sharepoint_1;Trusted_Connection=true;";
oSQLConn.Open();
on Windows Aplication it work good but on ASP.NET Web application I got an Server Error - Login failed for user *****************
is it problem with IIS configuration?

Make sure there is a user account for <machinename>/ASPNET and also the account has permissions on the objects.|||

Where can I check it? in ASP.Net configuration or in IIS configuration?

Greetz

|||In Sql Server under users under the database you are working on in Enterprise Manager
|||There is "My Domain\Domain Users" and still it don't work:/ I'm running asp script from computer in My Domain.