Ask a Question related to ASP.NET Security, Design and Development.
-
Ted #1
ASP.NET App with Unmanaged Code - HELP!
I think the following is a security configuration issue, can someone help?
I've been stumped on this for a couple of days now and I'm feeling the heat
at work.
--
I'm using a 3rd party ActiveX control which has it's own constructor and two
very simple methods (which ultimately sends out messages on the server's USB
port). I am trying to run this ActiveX component in my ASP.NET applicaiton.
For now, I'm testing this application via *localhost* connection, but will
eventually go to a client/server domain.
At first, within the Page_Load method, I successfully instantiate it using
the constructor -- no exceptions caught:
try
{
oABC = new ABCClass();
Response.Write("oABC object was created");
}
catch ..
Later, upon a button press, I try to use the method(s) within oABC -- again,
it appears everything works - no exceptions caught:
try
{
Object err;
err = oABC.Method1( "xxx", "xxx", null, null);
Response.Write("Method1 Succeeded - err = " + err.ToString());
}
catch ...
*BUT*, Method1 doesn't appear to send out a USB message.
*HOWEVER*, Method1 works fine in console C# app called directly from the
command line or if I surf to a VBScript/HTML file with the method call,
which presumably uses the ActiveX on the client's IE container. In both of
these cases the USB port receives/sends the messages.
Right now, IIS is running Anonymous Authentication (though Windows
Authentication is also checked in the dialog box), ASP.NET is running
Windows Authentication. Impersonation is not set (default=false). No
application identities set. Also, I have no CAS settings assigned. I think
this means that the calling process would be System process -- shouldn't
this have all the rights required?
If the unmanaged code is accessing files, I/O, etc. does the calling
assembly need to provide access?
Any recommendations?
Ted
Ted Guest
-
Invoke from unmanaged code
Hi, It is possible to invoke the web service from Embedded Visual C++? If yes, how? -
Access File Share from ASP.NET using Unmanaged Code
Hi, We have an application that requires appropriate users to run command files on an adhoc basis. We have implmented a library that uses the... -
Calling web service from unmanaged code
I don't know if this works in unmanaged code, but in managed code you can use the URL property of the proxy web service class for this. Alternativly... -
Web Services and Unmanaged Code
Hello, We are new in the .NET environment, and we have a working web app under Windows environment. I'm building a .NET Web Service in C#,... -
Security problem with Managed Code calling Unmanaged Code in a Web Page
Hello, I have a web page which contains an ActiveX control (unmanaged) and a Windows Forms User Control (managed). Both reside on a web page and... -
Kaustav #2
RE: ASP.NET App with Unmanaged Code - HELP!
Hi Ted,
use impersonation and your code should work. By default ASPNET account has
the least privileges and hence pretty often it is not able to execute various
methods which are otherwise possible when you are using a Console App or a
Winforms App since then such applications are running on the Security Context
of the logged in user.
HTH.
Kaustav Neogy.
"Ted" wrote:
> I think the following is a security configuration issue, can someone help?
> I've been stumped on this for a couple of days now and I'm feeling the heat
> at work.
>
> --
>
> I'm using a 3rd party ActiveX control which has it's own constructor and two
> very simple methods (which ultimately sends out messages on the server's USB
> port). I am trying to run this ActiveX component in my ASP.NET applicaiton.
> For now, I'm testing this application via *localhost* connection, but will
> eventually go to a client/server domain.
>
> At first, within the Page_Load method, I successfully instantiate it using
> the constructor -- no exceptions caught:
> try
> {
> oABC = new ABCClass();
> Response.Write("oABC object was created");
> }
> catch ..
>
> Later, upon a button press, I try to use the method(s) within oABC -- again,
> it appears everything works - no exceptions caught:
> try
> {
> Object err;
> err = oABC.Method1( "xxx", "xxx", null, null);
> Response.Write("Method1 Succeeded - err = " + err.ToString());
> }
> catch ...
>
> *BUT*, Method1 doesn't appear to send out a USB message.
>
> *HOWEVER*, Method1 works fine in console C# app called directly from the
> command line or if I surf to a VBScript/HTML file with the method call,
> which presumably uses the ActiveX on the client's IE container. In both of
> these cases the USB port receives/sends the messages.
>
> Right now, IIS is running Anonymous Authentication (though Windows
> Authentication is also checked in the dialog box), ASP.NET is running
> Windows Authentication. Impersonation is not set (default=false). No
> application identities set. Also, I have no CAS settings assigned. I think
> this means that the calling process would be System process -- shouldn't
> this have all the rights required?
>
> If the unmanaged code is accessing files, I/O, etc. does the calling
> assembly need to provide access?
>
> Any recommendations?
>
> Ted
>
>
>Kaustav Guest



Reply With Quote

