Permission issue with SQLDataSource?

P

perplexed

I'd like a small overview of requirements for inserting data into a
database with SQLDataSource in regards to permissions. In the
Page_Load(), my code looks similar to this (sorry, I don't have the
code with me now):

SqlDataSource mysource = new SqlDataSource("SQLClient", myconn,
CommandType.Text );
mysource.Insert( );

The above works fine when I'm local (192.168.1.100) but once I try to
access from the outside, it fails. I'm guessing perhaps because some
type of ASPNET user is not added into SQL Server 2005 users and does
not have access to the table. What are the correct steps to allow the
code to run?

I will be using a stored procedure in place of text.

Thanks,
john
 
E

Eliyahu Goldin

Your guess sounds right. You need to setup proper database connection.
Either introduce the asp.net user to the sql server and use windows
authentication or use sql authentication with user name and password.
 
B

brett

Thanks. I added correct permissions for network service account.
That's ok since this is local.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top