start Edge from IIS 5.1



I'm trying to run EdgeV16 from a web page developed in ASP.NET and have been running into serious trouble trying to figure out what needs to be done to overcome the following error.


Server Error in '/FireEdge_Again' Application.



Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

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. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


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 , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.


To grant ASP.NET 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 195: CreateDrawing()

Line 196: Catch ex As Exception

Line 197: objApp.Quit()

Line 198: objApp = Nothing

Line 199: End Try




I have no clue about configuring IIS and have'nt had any luck with trying to find information over the internet. So i'm posting this query out here as a last resort.


Calum, thank you for the code in so far, i think i really would need all the help i can get to resolve this issue. Please find the code attached with this post.


best regards,



Posted by: siddharth balaravi
Post date: 8/25/2005 8:47:21 PM


RE: start Edge from IIS 5.1



Well, I am not ASP.NET expert for sure, but here it goes:


[Quoted text from]

"I had same problem when I try to send a message to MSMQ server. I solved it by setting


in web.config file, this will enable you program to run in right security context."


I think the main issue is that you need to configure you web.config to use the setting. That allows your ASP.NET app to impersonate a user that has the correct security.




This an alternative way to do impersonation:



You can also try posting in the Microsoft newsgroups like this one: news://


Give it a try and let me know. I can do more research if necessary.


Posted by: Jason Newell
Post date: 8/26/2005 5:24:58 AM

RE: start Edge from IIS 5.1



thanks for the reply. I found those articles really useful and have been able to solve the problem of connecting SE with the ASPNET worker process.


I'm presently trying to determine whether SE is already running on the server and if so, then ASP should connect to the present instance of SE instead of creating a new instance. But the conventional technique as shown below does not work:



solidEdge = GetObject(, "SolidEdge.Application")

Catch ex As Exception



'do something

End Try


do you have any idea of another way of accomplishing this.


thank you




Posted by: siddharth balaravi
Post date: 8/30/2005 5:31:02 PM

RE: start Edge from IIS 5.1

Hi Siddharth,


I have posted a remoting example for you in the UGS forum.

This should solve your problem.





Posted by: Calum McLellan
Post date: 9/4/2005 11:11:40 PM

RE: start Edge from IIS 5.1

Hi Calum,


Thank you for the post. I'll be checking that binary in a bit.

I guess its pretty much Oktoberfest time back there by now.





Posted by: siddharth balaravi
Post date: 9/5/2005 5:41:54 PM

RE: start Edge from IIS 5.1



I have two questions for you with regard to the remoting code you provided earlier:


1. Is it possible to eliminate the need to hard-code the username, domain and password in the Authenticate user area of the code? The reason i'm asking is that it is not going to be possible for me to find these details in case the project is deployed on a remote server that i do not have access to.


2. Is it possible to queue requests to the SE server using the remoting example that you provided?


I'd be glad if you could give me this information or even links that can help me understand these areas. I really appreciate your help.


thank you.





Posted by: siddharth balaravi
Post date: 10/12/2005 6:00:39 AM

RE: start Edge from IIS 5.1

Hi Siddharth,


If you leave out the LogonUser call the program will either run on the IIS account or the users, I'm not sure which so you should do some tests.

With regard to queing - You should be able to sort out some logic in the Server program as this runs all the time. You could use a second thread or a timer to regularly check when one process is finished and start the next in line.


Hope this helps



Posted by: Calum McLellan
Post date: 10/16/2005 6:35:52 PM

RE: start Edge from IIS 5.1

yep Calum, that gives me an idea of where to start.

as always, thanks for the help, i really appreciate it




Posted by: siddharth balaravi
Post date: 10/17/2005 9:30:20 PM