473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Urgent help::: ASP.Net Access is denied

Hi Friends,

I want to develop a web based app where it will talk to a dll
(which retrieves real time data from a controller)
I've added a com dll reference to my project, the code is something like this:

GEOAuto.OPCServer OPCserver = new GEOAuto.GEServerClass();
GEOAuto.OPCGroup OPCGroup;
System.Object myNode = new System.Object();
object myval;
object myquality;
object mytime;

OPCserver.Connect("GEO Server",myNode);
// here it fails in asp.net, but works fine with Windows Application

on execution (ASP.NET) it gives me error, embedded in lines as:

==========================================
Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

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.
==========================================

I'm using Windows XP, IIS 5.1, VS.NET 2003.
I tried following:
1) In web.config I've added
<identity impersonate="true"/>
2) IIS authentication set up for this web server: Anonymous
3) using Integrated Windows Authentication

But still no results :-(

Anybody knows how to work around this?

Thanks in anticipation,
Sachin M

Nov 17 '05 #1
3 9402
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.

"Sachin_M" <Sa*****@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com...
Hi Friends,

I want to develop a web based app where it will talk to a dll
(which retrieves real time data from a controller)
I've added a com dll reference to my project, the code is something like
this:

GEOAuto.OPCServer OPCserver = new GEOAuto.GEServerClass();
GEOAuto.OPCGroup OPCGroup;
System.Object myNode = new System.Object();
object myval;
object myquality;
object mytime;

OPCserver.Connect("GEO Server",myNode);
// here it fails in asp.net, but works fine with Windows Application

on execution (ASP.NET) it gives me error, embedded in lines as:

==========================================
Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

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.
==========================================

I'm using Windows XP, IIS 5.1, VS.NET 2003.
I tried following:
1) In web.config I've added
<identity impersonate="true"/>
2) IIS authentication set up for this web server: Anonymous
3) using Integrated Windows Authentication

But still no results :-(

Anybody knows how to work around this?

Thanks in anticipation,
Sachin M

Nov 17 '05 #2
Hi Kiran,

thanks for the reply.
That I've already tried. But I'm not getting any kind of Security tab
whenever I right click on a file (properties) in Windows Explorer.
Can you tell me which file? the dll (to which I've added reference)

Regards,
Sachin

"kiran" wrote:
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.

"Sachin_M" <Sa*****@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com...
Hi Friends,

I want to develop a web based app where it will talk to a dll
(which retrieves real time data from a controller)
I've added a com dll reference to my project, the code is something like
this:

GEOAuto.OPCServer OPCserver = new GEOAuto.GEServerClass();
GEOAuto.OPCGroup OPCGroup;
System.Object myNode = new System.Object();
object myval;
object myquality;
object mytime;

OPCserver.Connect("GEO Server",myNode);
// here it fails in asp.net, but works fine with Windows Application

on execution (ASP.NET) it gives me error, embedded in lines as:

==========================================
Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

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.
==========================================

I'm using Windows XP, IIS 5.1, VS.NET 2003.
I tried following:
1) In web.config I've added
<identity impersonate="true"/>
2) IIS authentication set up for this web server: Anonymous
3) using Integrated Windows Authentication

But still no results :-(

Anybody knows how to work around this?

Thanks in anticipation,
Sachin M


Nov 17 '05 #3
The reason you are not getting a security tab is becuase you have "Simple
File Sharing" turned on. To turn this off just open an explorer windows, go
to Tools->Options and click on the "View" tab. In the "Advanced Setting"
section scroll down to the very bottom and uncheck the "Use simple file
sharing" option. Click on Apply/Ok and now when you right click on a file and
go to Properties you will have the security tab.

Hope this helps.

Brian Delahunty
Ireland

http://briandela.com/blog
"Sachin_M" wrote:
Hi Kiran,

thanks for the reply.
That I've already tried. But I'm not getting any kind of Security tab
whenever I right click on a file (properties) in Windows Explorer.
Can you tell me which file? the dll (to which I've added reference)

Regards,
Sachin

"kiran" wrote:
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.

"Sachin_M" <Sa*****@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com...
Hi Friends,

I want to develop a web based app where it will talk to a dll
(which retrieves real time data from a controller)
I've added a com dll reference to my project, the code is something like
this:

GEOAuto.OPCServer OPCserver = new GEOAuto.GEServerClass();
GEOAuto.OPCGroup OPCGroup;
System.Object myNode = new System.Object();
object myval;
object myquality;
object mytime;

OPCserver.Connect("GEO Server",myNode);
// here it fails in asp.net, but works fine with Windows Application

on execution (ASP.NET) it gives me error, embedded in lines as:

==========================================
Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

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.
==========================================

I'm using Windows XP, IIS 5.1, VS.NET 2003.
I tried following:
1) In web.config I've added
<identity impersonate="true"/>
2) IIS authentication set up for this web server: Anonymous
3) using Integrated Windows Authentication

But still no results :-(

Anybody knows how to work around this?

Thanks in anticipation,
Sachin M


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
0
by: Naman Sud | last post by:
Hi, I am unable to run excel application in ASP.net. I have used the com reference of object library 9.0 in WIndows 2000. Its generate the access denied error for the aspnet user. When I tried to...
2
by: Ramesh Babu | last post by:
hi All, When I run my asp.net application, I am getting this following error message. "Error while trying to run project: Unable to start debugging on the web server. Access is denied. Would...
0
by: Amratash | last post by:
Hi, I needyour help.Its urgent. My main aim is to log the site activities in a database at runtime. I'm using W3C Extended Log File format for logging information. I can use ODBC Logging directly...
3
by: Microsoft Newsgroups | last post by:
Hi all, I'm having an interesting problem with my IE Webcontrols. I'm using the toolbar and when I test it in my browser using "http://localhost/mysite", it works fine. Incidentally, I have...
5
by: tjaink | last post by:
Hi I have a vc++ dll and its stored in Windows directory. I am using OS Windows 2003 server. And i am using ASP Legacy application migrated from NT to Windows 2003 server. Now there is no problem...
77
by: Hans Schneider | last post by:
1. in the prg bellow what vars are stored on stack, heap, data segment? int i; void main() { int j; int *k = (void *)malloc(1); }
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
2
by: =?ISO-8859-1?B?RulybmFz?= | last post by:
Hey all, I have a URGENT problem and I hope someone could help me... scenery: I have a windows app, coded using C# (framework 1.1 - VS2003)... The exe and dlls of the app is are stored in a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.