Ask a Question related to ASP.NET Security, Design and Development.
-
Bill Heckle #1
DPAPI Enterprise Services Example
I am trying to work through the sample from msdn, "How To Use DPAPI (User
Store) from ASP.NET with Enterprise Services". I thought I had everything
configured correctly. I tried to test the service and get the following
error.(Sorry for encluding every line). I am confused as to what setting is
incorrectly set. Additionally, the paragraph on giving asp.net access doesn't
help me at all. Thanks for help, as I don't want to keep thrashing about. Any
advice on where to read more about security in general is appreciated.
Exception Details: System.UnauthorizedAccessException: Access is denied.
ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the boxes
for the desired access.
Source Error:
Line 59: private void btnEncrypt_Click(object sender, System.EventArgs e)
Line 60: {
Line 61: DataProtectorComp dp = new DataProtectorComp();
Line 62: try
Line 63: {
Source File: c:\documents and
settings\bill\vswebcache\billfun\dpapiweb\webform1 .aspx.cs Line: 61
Stack Trace:
[UnauthorizedAccessException: Access is denied.]
System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32
errorCode, IntPtr errorInfo) +0
System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type serverType,
Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +581
System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Type
serverType) +181
System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj) +74
DPAPIWeb.WebForm1.btnEncrypt_Click(Object sender, EventArgs e) in
c:\documents and settings\bill
heckle\vswebcache\billfun\dpapiweb\webform1.aspx.c s:61
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Bill Heckle Guest
-
DPAPI
Hi everyone. I'm creating an app that stores DB connection strings in the web config file. I'm using the MSDN resources at... -
I've installed a commercial copy of 2003 Enterprise over a 2003 enterprise trial and activation troubles ...
Hi I've installed a commercial copy of 2003 Enterprise over a 2003 enterprise activated trial version. After logon the system says that I must... -
securing ASP.NET with Enterprise Services
I am building an ASP.NET application, with the following idea. The project is split into three layers UI, BLL and DAL. The UI (webpages) with... -
Web services are not working on win2003 server Enterprise edition
Hi I have created a simple "Hello world" ASP.NET web service for tesing purpose. This runs well on windows2000 machines but if I deploy in the... -
WS / Com+ -> Enterprise services and Transactions
Hi, I'm doing a study on how to implement Transactionmanagement into our coming ..Net projects. We have earlier worked with Sybase XA and BEA... -
Paul Glavich [MVP - ASP.NET] #2
Re: DPAPI Enterprise Services Example
Looks like you are using a ServicedComponent in COM+? That may complicate
things a little but you may need to give read/write access to whichever user
you are running under (might be ASPNET, NETWORK SERVICE, or the defined
identity in COM+) to your "\Document And
Settings\{user}\ApplicationData\Crypto" directory.
--
- Paul Glavich
Microsoft MVP - ASP.NET
"Bill Heckle" <billheckle.spam@hotmail.com> wrote in message
news:D0CD2FDF-F29C-46E4-955A-5665AFE9603A@microsoft.com...is> I am trying to work through the sample from msdn, "How To Use DPAPI (User
> Store) from ASP.NET with Enterprise Services". I thought I had everything
> configured correctly. I tried to test the service and get the following
> error.(Sorry for encluding every line). I am confused as to what settingdoesn't> incorrectly set. Additionally, the paragraph on giving asp.net accessAny> help me at all. Thanks for help, as I don't want to keep thrashing about.or> advice on where to read more about security in general is appreciated.
>
> Exception Details: System.UnauthorizedAccessException: Access is denied.
> ASP.NET is not authorized to access the requested resource. Consider
> granting access rights to the resource to the ASP.NET request identity.
> ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5boxes> Network Service on IIS 6) that is used if the application is not
> impersonating. If the application is impersonating via <identity
> impersonate="true"/>, the identity will be the anonymous user (typically
> IUSR_MACHINENAME) or the authenticated request user.
>
> To grant ASP.NET write access to a file, right-click the file in Explorer,
> choose "Properties" and select the Security tab. Click "Add" to add the
> appropriate user or group. Highlight the ASP.NET account, and check theSystem.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ> for the desired access.
>
> Source Error:
> Line 59: private void btnEncrypt_Click(object sender, System.EventArgs e)
> Line 60: {
> Line 61: DataProtectorComp dp = new DataProtectorComp();
> Line 62: try
> Line 63: {
>
> Source File: c:\documents and
> settings\bill\vswebcache\billfun\dpapiweb\webform1 .aspx.cs Line: 61
>
> Stack Trace:
>
> [UnauthorizedAccessException: Access is denied.]
> System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32
> errorCode, IntPtr errorInfo) +0
> System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type serverType,
> Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +581
>
>
eSystem.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ> serverType) +181
>
>
eSystem.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo> serverType, Object[] props, Boolean bNewObj) +74
> DPAPIWeb.WebForm1.btnEncrypt_Click(Object sender, EventArgs e) in
> c:\documents and settings\bill
> heckle\vswebcache\billfun\dpapiweb\webform1.aspx.c s:61
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
>
>
stBackEvent(String eventArgument) +57> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
> System.Web.UI.Page.ProcessRequestMain() +1277
>
>
>
>
Paul Glavich [MVP - ASP.NET] Guest
-
Paul Glavich [MVP - ASP.NET] #3
Re: DPAPI Enterprise Services Example
Sorry, correction to my last post, the path to the directory is :-
\Documents and Settings\All Users\Application Data\Microsoft\Crypto
or even just
\Documents and Settings\All Users\Application
Data\Microsoft\Crypto\RSA\MachineKeys
I think may do the trick.
--
- Paul Glavich
Microsoft MVP - ASP.NET
"Paul Glavich [MVP - ASP.NET]" <glav@aspalliance.com-NOSPAM> wrote in
message news:echdn5ciEHA.3428@TK2MSFTNGP11.phx.gbl...user> Looks like you are using a ServicedComponent in COM+? That may complicate
> things a little but you may need to give read/write access to whichever(User> you are running under (might be ASPNET, NETWORK SERVICE, or the defined
> identity in COM+) to your "\Document And
> Settings\{user}\ApplicationData\Crypto" directory.
>
> --
> - Paul Glavich
> Microsoft MVP - ASP.NET
>
>
> "Bill Heckle" <billheckle.spam@hotmail.com> wrote in message
> news:D0CD2FDF-F29C-46E4-955A-5665AFE9603A@microsoft.com...> > I am trying to work through the sample from msdn, "How To Use DPAPIeverything> > Store) from ASP.NET with Enterprise Services". I thought I hadabout.> is> > configured correctly. I tried to test the service and get the following
> > error.(Sorry for encluding every line). I am confused as to what setting> doesn't> > incorrectly set. Additionally, the paragraph on giving asp.net access> > help me at all. Thanks for help, as I don't want to keep thrashingExplorer,> Any> or> > advice on where to read more about security in general is appreciated.
> >
> > Exception Details: System.UnauthorizedAccessException: Access is denied.
> > ASP.NET is not authorized to access the requested resource. Consider
> > granting access rights to the resource to the ASP.NET request identity.
> > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5> > Network Service on IIS 6) that is used if the application is not
> > impersonating. If the application is impersonating via <identity
> > impersonate="true"/>, the identity will be the anonymous user (typically
> > IUSR_MACHINENAME) or the authenticated request user.
> >
> > To grant ASP.NET write access to a file, right-click the file ine)> boxes> > choose "Properties" and select the Security tab. Click "Add" to add the
> > appropriate user or group. Highlight the ASP.NET account, and check the> > for the desired access.
> >
> > Source Error:
> > Line 59: private void btnEncrypt_Click(object sender, System.EventArgsSystem.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ>> > Line 60: {
> > Line 61: DataProtectorComp dp = new DataProtectorComp();
> > Line 62: try
> > Line 63: {
> >
> > Source File: c:\documents and
> > settings\bill\vswebcache\billfun\dpapiweb\webform1 .aspx.cs Line: 61
> >
> > Stack Trace:
> >
> > [UnauthorizedAccessException: Access is denied.]
> > System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32
> > errorCode, IntPtr errorInfo) +0
> > System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type serverType,
> > Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +581
> >
> >System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ> e>> > serverType) +181
> >
> >System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo> e>> > serverType, Object[] props, Boolean bNewObj) +74
> > DPAPIWeb.WebForm1.btnEncrypt_Click(Object sender, EventArgs e) in
> > c:\documents and settings\bill
> > heckle\vswebcache\billfun\dpapiweb\webform1.aspx.c s:61
> > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> >
> >+33> stBackEvent(String eventArgument) +57> > System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> > sourceControl, String eventArgument) +18
> > System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)>> > System.Web.UI.Page.ProcessRequestMain() +1277
> >
> >
> >
> >
>
Paul Glavich [MVP - ASP.NET] Guest
-
Bill Heckle #4
Re: DPAPI Enterprise Services Example
Paul,
Thank you very much for responding. I tried changing the account that Com+
used to activate the component. I switched it to my development account. I
got a new error saying that the registry
key,HKEY_CLASSES_ROOT\DPAPIComp.DataProtectorComp, could not be accessed. I
looked at the permissions for the key and believe every account that matters
has access. Obviously, I am wrong. Any thoughts would be helpful. Currently
the following account and roles have access.
Administrators,Application Test Center,aspnet_wp account(ASPNET),my
development account,OWNER,DPAPIAccount(my original com+ activation account),
local service,service,network,power users,system and users
Thanks.
"Paul Glavich [MVP - ASP.NET]" wrote:
> Sorry, correction to my last post, the path to the directory is :-
> \Documents and Settings\All Users\Application Data\Microsoft\Crypto
>
> or even just
>
> \Documents and Settings\All Users\Application
> Data\Microsoft\Crypto\RSA\MachineKeys
>
> I think may do the trick.
>
> --
> - Paul Glavich
> Microsoft MVP - ASP.NET
>
>
> "Paul Glavich [MVP - ASP.NET]" <glav@aspalliance.com-NOSPAM> wrote in
> message news:echdn5ciEHA.3428@TK2MSFTNGP11.phx.gbl...> user> > Looks like you are using a ServicedComponent in COM+? That may complicate
> > things a little but you may need to give read/write access to whichever> (User> > you are running under (might be ASPNET, NETWORK SERVICE, or the defined
> > identity in COM+) to your "\Document And
> > Settings\{user}\ApplicationData\Crypto" directory.
> >
> > --
> > - Paul Glavich
> > Microsoft MVP - ASP.NET
> >
> >
> > "Bill Heckle" <billheckle.spam@hotmail.com> wrote in message
> > news:D0CD2FDF-F29C-46E4-955A-5665AFE9603A@microsoft.com...> > > I am trying to work through the sample from msdn, "How To Use DPAPI> everything> > > Store) from ASP.NET with Enterprise Services". I thought I had> about.> > is> > > configured correctly. I tried to test the service and get the following
> > > error.(Sorry for encluding every line). I am confused as to what setting> > doesn't> > > incorrectly set. Additionally, the paragraph on giving asp.net access> > > help me at all. Thanks for help, as I don't want to keep thrashing> Explorer,> > Any> > or> > > advice on where to read more about security in general is appreciated.
> > >
> > > Exception Details: System.UnauthorizedAccessException: Access is denied.
> > > ASP.NET is not authorized to access the requested resource. Consider
> > > granting access rights to the resource to the ASP.NET request identity.
> > > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5> > > Network Service on IIS 6) that is used if the application is not
> > > impersonating. If the application is impersonating via <identity
> > > impersonate="true"/>, the identity will be the anonymous user (typically
> > > IUSR_MACHINENAME) or the authenticated request user.
> > >
> > > To grant ASP.NET write access to a file, right-click the file in> e)> > boxes> > > choose "Properties" and select the Security tab. Click "Add" to add the
> > > appropriate user or group. Highlight the ASP.NET account, and check the> > > for the desired access.
> > >
> > > Source Error:
> > > Line 59: private void btnEncrypt_Click(object sender, System.EventArgs> System.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ> >> > > Line 60: {
> > > Line 61: DataProtectorComp dp = new DataProtectorComp();
> > > Line 62: try
> > > Line 63: {
> > >
> > > Source File: c:\documents and
> > > settings\bill\vswebcache\billfun\dpapiweb\webform1 .aspx.cs Line: 61
> > >
> > > Stack Trace:
> > >
> > > [UnauthorizedAccessException: Access is denied.]
> > > System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32
> > > errorCode, IntPtr errorInfo) +0
> > > System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type serverType,
> > > Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +581
> > >
> > >> System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ> > e> >> > > serverType) +181
> > >
> > >> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo> > e> >> > > serverType, Object[] props, Boolean bNewObj) +74
> > > DPAPIWeb.WebForm1.btnEncrypt_Click(Object sender, EventArgs e) in
> > > c:\documents and settings\bill
> > > heckle\vswebcache\billfun\dpapiweb\webform1.aspx.c s:61
> > > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> > >
> > >> +33> > stBackEvent(String eventArgument) +57> > > System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> > > sourceControl, String eventArgument) +18
> > > System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)>> >> > > System.Web.UI.Page.ProcessRequestMain() +1277
> > >
> > >
> > >
> > >
> >
>
>Bill Heckle Guest
-
Paul Glavich [MVP - ASP.NET] #5
Re: DPAPI Enterprise Services Example
Just as a test, try giving Internet applications "Full Trust" via the
machine policy in .Net framework configuration. (Start --> Control Panel -->
Administrative Tools --> .Net framework config then Expand 'Runtime
Security Policy' --> Machine --> Code Groups -> All Code --> Internet
Zone --> Right click --> Properties --> Go to permissions set tab, select
Full trust). By default, ASP.NET web apps only have limited access via this
policy and certainly dont have "interop" permissions. It looks as though you
might be getting denied access when trying to do interop.
--
- Paul Glavich
Microsoft MVP - ASP.NET
"Bill Heckle" <billheckle.spam@hotmail.com> wrote in message
news:3696AF0E-FCD5-47AE-835D-19016D9D1BD8@microsoft.com...Com+> Paul,
>
> Thank you very much for responding. I tried changing the account thatI> used to activate the component. I switched it to my development account. I
> got a new error saying that the registry
> key,HKEY_CLASSES_ROOT\DPAPIComp.DataProtectorComp, could not be accessed.matters> looked at the permissions for the key and believe every account thatCurrently> has access. Obviously, I am wrong. Any thoughts would be helpful.account),> the following account and roles have access.
> Administrators,Application Test Center,aspnet_wp account(ASPNET),my
> development account,OWNER,DPAPIAccount(my original com+ activationcomplicate> local service,service,network,power users,system and users
>
> Thanks.
>
> "Paul Glavich [MVP - ASP.NET]" wrote:
>> > Sorry, correction to my last post, the path to the directory is :-
> > \Documents and Settings\All Users\Application Data\Microsoft\Crypto
> >
> > or even just
> >
> > \Documents and Settings\All Users\Application
> > Data\Microsoft\Crypto\RSA\MachineKeys
> >
> > I think may do the trick.
> >
> > --
> > - Paul Glavich
> > Microsoft MVP - ASP.NET
> >
> >
> > "Paul Glavich [MVP - ASP.NET]" <glav@aspalliance.com-NOSPAM> wrote in
> > message news:echdn5ciEHA.3428@TK2MSFTNGP11.phx.gbl...> > > Looks like you are using a ServicedComponent in COM+? That maywhichever> > > things a little but you may need to give read/write access todefined> > user> > > you are running under (might be ASPNET, NETWORK SERVICE, or thefollowing> > (User> > > identity in COM+) to your "\Document And
> > > Settings\{user}\ApplicationData\Crypto" directory.
> > >
> > > --
> > > - Paul Glavich
> > > Microsoft MVP - ASP.NET
> > >
> > >
> > > "Bill Heckle" <billheckle.spam@hotmail.com> wrote in message
> > > news:D0CD2FDF-F29C-46E4-955A-5665AFE9603A@microsoft.com...
> > > > I am trying to work through the sample from msdn, "How To Use DPAPI> > everything> > > > Store) from ASP.NET with Enterprise Services". I thought I had> > > > configured correctly. I tried to test the service and get thesetting> > > > error.(Sorry for encluding every line). I am confused as to whataccess> > > is
> > > > incorrectly set. Additionally, the paragraph on giving asp.netappreciated.> > about.> > > doesn't
> > > > help me at all. Thanks for help, as I don't want to keep thrashing> > > Any
> > > > advice on where to read more about security in general isdenied.> > > >
> > > > Exception Details: System.UnauthorizedAccessException: Access isidentity.> > > > ASP.NET is not authorized to access the requested resource. Consider
> > > > granting access rights to the resource to the ASP.NET requestIIS 5> > > > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on(typically> > > or
> > > > Network Service on IIS 6) that is used if the application is not
> > > > impersonating. If the application is impersonating via <identity
> > > > impersonate="true"/>, the identity will be the anonymous userthe> > Explorer,> > > > IUSR_MACHINENAME) or the authenticated request user.
> > > >
> > > > To grant ASP.NET write access to a file, right-click the file in> > > > choose "Properties" and select the Security tab. Click "Add" to addthe> > > > appropriate user or group. Highlight the ASP.NET account, and checkSystem.EventArgs> > > boxes
> > > > for the desired access.
> > > >
> > > > Source Error:
> > > > Line 59: private void btnEncrypt_Click(object sender,61> > e)> > > > Line 60: {
> > > > Line 61: DataProtectorComp dp = new DataProtectorComp();
> > > > Line 62: try
> > > > Line 63: {
> > > >
> > > > Source File: c:\documents and
> > > > settings\bill\vswebcache\billfun\dpapiweb\webform1 .aspx.cs Line:serverType,> > > >
> > > > Stack Trace:
> > > >
> > > > [UnauthorizedAccessException: Access is denied.]
> > > > System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32
> > > > errorCode, IntPtr errorInfo) +0
> > > > System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(TypeSystem.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ> >> > > > Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +581
> > > >
> > > >
> > >System.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ> >> > > e
> > > > serverType) +181
> > > >
> > > >
> > >System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo> >> > > e
> > > > serverType, Object[] props, Boolean bNewObj) +74
> > > > DPAPIWeb.WebForm1.btnEncrypt_Click(Object sender, EventArgs e) in
> > > > c:\documents and settings\bill
> > > > heckle\vswebcache\billfun\dpapiweb\webform1.aspx.c s:61
> > > > System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> > > >
> > > >
> > >postData)> > > stBackEvent(String eventArgument) +57
> > > > System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> > > > sourceControl, String eventArgument) +18
> > > > System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection> > +33> >> > > > System.Web.UI.Page.ProcessRequestMain() +1277
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
Paul Glavich [MVP - ASP.NET] Guest
-
Martin #6
Re: DPAPI Enterprise Services Example
Hi Bill,
I'm going through the same process, but am stuck at trying to start the
service - I get error 5: access is denied.
The local account I configured for this has Log on as batch job and log on
locally rights.
The service starts ok if I make the account a member of adminstrators, so
that rules out code errors.
Do you have any tips for me on this?
Thanks in advance
Martin
"Bill Heckle" <billheckle.spam@hotmail.com> wrote in message
news:D0CD2FDF-F29C-46E4-955A-5665AFE9603A@microsoft.com...is> I am trying to work through the sample from msdn, "How To Use DPAPI (User
> Store) from ASP.NET with Enterprise Services". I thought I had everything
> configured correctly. I tried to test the service and get the following
> error.(Sorry for encluding every line). I am confused as to what settingdoesn't> incorrectly set. Additionally, the paragraph on giving asp.net accessAny> help me at all. Thanks for help, as I don't want to keep thrashing about.or> advice on where to read more about security in general is appreciated.
>
> Exception Details: System.UnauthorizedAccessException: Access is denied.
> ASP.NET is not authorized to access the requested resource. Consider
> granting access rights to the resource to the ASP.NET request identity.
> ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5boxes> Network Service on IIS 6) that is used if the application is not
> impersonating. If the application is impersonating via <identity
> impersonate="true"/>, the identity will be the anonymous user (typically
> IUSR_MACHINENAME) or the authenticated request user.
>
> To grant ASP.NET write access to a file, right-click the file in Explorer,
> choose "Properties" and select the Security tab. Click "Add" to add the
> appropriate user or group. Highlight the ASP.NET account, and check theSystem.EnterpriseServices.ServicedComponentProxyAt tribute.CreateInstance(Typ> for the desired access.
>
> Source Error:
> Line 59: private void btnEncrypt_Click(object sender, System.EventArgs e)
> Line 60: {
> Line 61: DataProtectorComp dp = new DataProtectorComp();
> Line 62: try
> Line 63: {
>
> Source File: c:\documents and
> settings\bill\vswebcache\billfun\dpapiweb\webform1 .aspx.cs Line: 61
>
> Stack Trace:
>
> [UnauthorizedAccessException: Access is denied.]
> System.Runtime.InteropServices.Marshal.ThrowExcept ionForHR(Int32
> errorCode, IntPtr errorInfo) +0
> System.EnterpriseServices.Thunk.Proxy.CoCreateObje ct(Type serverType,
> Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) +581
>
>
eSystem.Runtime.Remoting.Activation.ActivationServi ces.IsCurrentContextOK(Typ> serverType) +181
>
>
eSystem.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePo> serverType, Object[] props, Boolean bNewObj) +74
> DPAPIWeb.WebForm1.btnEncrypt_Click(Object sender, EventArgs e) in
> c:\documents and settings\bill
> heckle\vswebcache\billfun\dpapiweb\webform1.aspx.c s:61
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
>
>
stBackEvent(String eventArgument) +57> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
> sourceControl, String eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
> System.Web.UI.Page.ProcessRequestMain() +1277
>
>
>
>
Martin Guest



Reply With Quote

