Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Saturday, March 31, 2012

The ASPNET Sql Server Account

What's the proper way to setup this account in SQL Server?

We're using Windows authentication on our network and to give any user permission in the database I have to grant it to the ASPNET account. This seems to defeat the purpose of using Windows authentication because anyone that opens the ASP.NET page will have those rights in the database even if they aren't listed as a user in the DB.

For example, I give read-only rights to the ASPNET account and even if I give an individual user db_datawriter rights, they still cannot write to the DB unless I grant the ASPNET account db_datawriter rights. Then anyone can save/modify the data.Is SQL server installed on the same machine as IIS?

This will have an impace on how the ASPNET user operates.
Both are on the same machine.
set impersonation on in the web config file

<impersonate=true/>

Or something to that affect...
This is a good article on the microsoft site, it explains the different methods for accessing SQL server.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconaccessingsqlserverfromwebapplication.asp

This is also a good article.
http://support.microsoft.com/default.aspx?scid=kb;en-us;815154
Originally posted by hellswraith
set impersonation on in the web config file

<impersonate=true/>

Or something to that affect...

that did the trick. well actually it was

<identity impersonate="true" />

then you can get rid of the ASPNET account if using Windows authentication.
Does anyone know if this impersonate would work if IIS and SQL server are on different machines.
I have a feeling it won't but I am happy to be told I am wrong.
I'm pretty sure they have to be on the same machine. I think I read that on MSDN.
That was my understanding. The first article in on of my previous posts talks about it.
Sometimes I wonder if I understand it the way they mean it.
From my interpretation of the article, You need to have the SQL Server and IIS (web server) on the same machine if you want to use Windows authentication OR anonymous access with the ASPNET account.

If you want to access the SQL Server using a Mapped Windows Domain User or prompting for the username and password and passing them as credentials then you don't need the SQL Server and web server on the same machine.
I went on ASP.NET training last week where IIS and SQL were on the same server, the ASPNET account was used.
We came away thinking that is how it naturally worked. It took me half a day and some searching to find out it wasn't so cut and dried.

Saturday, March 24, 2012

The dreaded asp.clipboard

this is a permissions issue. your aspnet account needs permission to
manipulate system resources on the desktop
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Bill Belliveau" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:06D644D5-E7C1-47D1-97AC-826157A1BFA2@dotnet.itags.org.microsoft.com...
> Hello all,
> I have the need to copy something to the clipboard via 3rd party type
> library and then pick it up on the .NET side via the clipboard (all
> server-side). To complicate the issue, the application needs to be web
> oriented (ASP.NET).
> I have a console version that work, but I can't seem to get the ASP side
> working. I have included the Forms assembly and I'm able to write to the
> clipboard via the 3rd party, but the clipboard is always unassigned (null)
> in ASP.NET when in fact the clipboard can be pasted into PhotoShop.
> I've searched a lot of articles about this issue. Some suggest that it's
> a permissions issue. To rule out permissions, I have the site
> impersonate. The impersonating identity is myself and since I can past
> into Photoshop, I can only assume my identity has access to the clipboard.
> Any insight is appreciated.
> Thanks,
> Bill
>Alvin,
Thanks for the response.
Maybe I'm missing something else then. Before impersionation I tried settin
g the processModel user to SYSTEM, and had the same problem. I have also ad
ded the ASPNET account to the 'run as part of the operation system' policy w
ith no luck.
When I call, clipboardData.GetDataPresent(DataFormats.Bitmap) the exception
being returned is null object (Object reference not set to an instance of an
object.). The most likely cause is permissions, but as far as I can tell I
've tried giving the adequa
te permissions - or am I missing something?
Thanks again.
Bill
can you impersonate to an authenticated user and see if this works?
Otherwise post your code and i'll work with you on it
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Bill Belliveau" <anonymous@.discussions.microsoft.com> wrote in message
news:C8A65D45-FCD3-4871-A822-79EA22F5E7A7@.microsoft.com...
> Alvin,
> Thanks for the response.
> Maybe I'm missing something else then. Before impersionation I tried
> setting the processModel user to SYSTEM, and had the same problem. I have
> also added the ASPNET account to the 'run as part of the operation system'
> policy with no luck.
> When I call, clipboardData.GetDataPresent(DataFormats.Bitmap) the
> exception being returned is null object (Object reference not set to an
> instance of an object.). The most likely cause is permissions, but as far
> as I can tell I've tried giving the adequate permissions - or am I missing
> something?
> Thanks again.
> Bill