Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Monday, March 26, 2012

Permissions via ASP.NET web site

I have a website with membership system. I've been through a lot implementing the site and I think I'm on the verge of full implementation. I can't get my registration page or my admin page to add, edit or delete users. I'm assuming that asp does not have proper permissions on SQL to do such.

I'm running the site on a provider that has a SQL 2000 server. I access the database through VS2005 and SQL Server Management Studio Express.

Is there a tutorial out there that could help a newbie to SQL understand how to check and correct my permissions issue (or find out that I'm haveing a different issue entirely.

-Bill

SQL Server 2000 require you to go in and manually create the account before you can run it I have answered this question in the thread below go through it and apply the instructions in the last link and post again if you still need help. Hope this helps.

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

|||

Thank you for your prompt reply.

Further research indicates that my roles are conflicted also. My registrations are being created, but I can't see the role that's being created for them. Once I figure that out, I'll be able to add that role to the proper table and be able to see all of the users I create. Editing and deleting users is still not possible given the instructions you posted. I still need to change the permissions from my admin page. The create user is working.

Thank you

|||

You are not supposed to edit and delete users so delete the database you have created and start new this time do everything in SQL Server 2000 because Express and 2000 are not the same. Hope this helps.

http://blog.vanslaars.com/archive/2006/05/17/ASP.NET-2.0-Membership-with-SQL-2000.aspx

sql

Monday, February 20, 2012

Permission denied in ASP.NET 2.0 with IE

When I start my ASP.NET 2.0 Website in VS2005 with XPSP2 I can connect to
the SQL-Express Database without problems
But when I start my Website with Internet Explorer I get the following
error:
CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file
C:\CKlein1\App_Data\Ger1_Data.mdf failed. A database with the same name
exists, or specified file cannot be opened, or it is located on UNC share.
SQLExpress runs under NT AUTHORITY/NetworkService and the connection string
in web.config is:
"Data
Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Ger1_Data.mdf;Integrate
d
Security=True;User Instance=False"
1. Why does it work with VS2005 and not with Internet Explorer?
2. How can I set the rigth permission to the daba base?
HelmutI would change tactics here. I would stop using AttachDbFilename. To do so
you simply need to run a one-time script to attach the database to master.
After that, the database remain in place indefinitely . In any case you need
to set the initial catalog in the ConnectionString. See Chapter 9 of my book
for a longer discussion of this issue.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Helmut Guenther" <q@.2qw.de> wrote in message
news:%23BP2KfOHIHA.4880@.TK2MSFTNGP03.phx.gbl...
> When I start my ASP.NET 2.0 Website in VS2005 with XPSP2 I can connect to
> the SQL-Express Database without problems
> But when I start my Website with Internet Explorer I get the following
> error:
> CREATE DATABASE permission denied in database 'master'.
> An attempt to attach an auto-named database for file
> C:\CKlein1\App_Data\Ger1_Data.mdf failed. A database with the same name
> exists, or specified file cannot be opened, or it is located on UNC share.
> SQLExpress runs under NT AUTHORITY/NetworkService and the connection
> string in web.config is:
> "Data
> Source=. \SQLEXPRESS;AttachDbFilename=|DataDirect
ory|\Ger1_Data.mdf;Integra
ted
> Security=True;User Instance=False"
> 1. Why does it work with VS2005 and not with Internet Explorer?
> 2. How can I set the rigth permission to the daba base?
> Helmut
>