Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

:) Thank u for listening to me

 

I m new to ASP.NET ,Now my problem is as follows :

 

I tried to create one ASP.NET web application with Vb.NET

 

I used DataForm Wizard to connect to the SqlsERVER2000 DATABASE SERVER

mY sERVER NAME IS: OHOSERVER\VSDOTNET

 

In the DataLinkProperties I Specified Server Name as OHOSERVER\VSDOTNET

Then I specified information to log on to the server as- Use WindowsNT integrated security.

Then I selected my database name from the dropdown list

Then I clicked on the button labelled "Test Connection" and got the message "Test Connection Succeeded"

on clicking the finish button

A Button labelled "Load" is displayed on the DataWebform1.ASPx

I clicked Run button

and clicked on the Button labelled "Load"

and I am getting the following Error message

 

 

Login failed for user 'OHOSERVER\ASPNET'.

 

Why I was not able to display the contents of my table? :confused:

My OS is Windows2000 professional

 

 

Plz help me

ima
  • Administrators
Posted (edited)
If you are accessing SQL from an ASP.Net application the web app will access the DB as the user account the application itself runs as (\ASPNET. You will either need to grant this account permissions to the SQL server / database or investigate impersonation (search these forums and you will get some examples) Edited by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

But how can I grant this account permissions to the SQL server / database .Which file ?I m using SQLServer2000 desktop engine.(I also searched the entire forum for

'imppersonation' but I got only my thread as result.) .Please specify clearly.

Thank u for your quick reply.

ima
  • Administrators
Posted

Whoops - my bad, bit of a typo (i'll fix it now)

http://www.xtremedotnettalk.com/showthread.php?t=73612&highlight=impersonation is probably a good link to start.

If you need to change permissions on a database either use Enterprise Manager to create a login / user for the DB or through Query Analyzer you can use a couple of stored procs (sp_grantlogin and sp_adduser)

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...