Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Unable to generate a temporary class

$
0
0
Re: Unable to generate a temporary class
Web Service Proxy Generator
Re: Unable to generate a temporary class
Dec. 21, 2012
12:23 pm
3O80QKJKCShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Stein Goering

This error usually means that specific permissions are missing in a temp folder. If memory serves temporary serialization assemblies are created in the the Windows\Temp (which is hte system temporary folder not the user one).

You might get by setting permissions on that folder to allow whatever user/group is running the application.

+++ Rick ---



It appears that it is able to instantiate wwDotNetBridge and load the assembly but then fails at this line in the LoadService routine when trying to instantiate my proxy object:

this.oService = this.oBridge.Createinstance(this.cComClass)

At that point it throws the "Unable to generate temporary class" error.

As noted, this all works fine on other sites with ordinary permissions. The fact that the error went away at this location when running as Admin finally convinced their IT people that it was indeed an issue with their environment and not a problem with my code. Their plan is now to look into those other areas and figure out where they can upgrade specific permissions so they can run this without granting full admin rights.

--stein

Hmmm... you shouldn't need admin rights, but there might be other rights that are required.

What actually fails? Does it fail to load or are there errors running the component? There might be other things like permissions to access the network or the internet that might be failing...

+++ Rick ---



Can we just override those restrictions by making it an Administrator as a short-term fix?

The answer appears to be Yes. We gave the COM identity account Administrator rights and the errors went away.

The next step is to figure out how to explicitly grant the ability to instantiate the .NET components without having to allow full admin rights.


There are no network shares involved - everything happens on the web server that hosts our WC app. We're running in COM, under a dedicated account named AWSA. That account has full control over the wwDotNetBridge and TPGSecureLinkProxy DLLs (the latter is our web service proxy library).

Checking the contents of the Microsoft.NET folder indicates that they do have .NET installed.
In Framework: V1.0.3705 V1.1.4322 V2.0.50727 V3.0 V3.5
In Framework64: V2.0.50727 V3.0 V3.5

How do we check that the AWSA account has rights to instantiate .NET components? Can we just override those restrictions by making it an Administrator as a short-term fix?

--stein



Are you running the DLLs off a network share? If so you need to enable the configuration to be able to execute from the Intranet Zone.

http://west-wind.com/wsdlgenerator/docs/?page=_36e0qlogr.htm

Permissions of the host application definititely matter - basically you have to the rights to instantiate the .NET component based on the machine policy. It could also be that .NET is not installed at all.

+++ Rick ---


They say that the COM identity account has full control on the DLLs (dotnetbridge and the proxy object). They've scheduled a conference call tomorrow to troubleshoot this - any suggestions as to what we should look for?

--stein


Should have mentioned that the proxy is being called from a method in my WC app, which is running under COM. I'm having them check that COM identity account has execute permissions on the proxy DLL file - assuming that's the case, I wouldn't think it's a permissions issue. Given the COM environment, there isn't really a simple way to try Running As Admin.

--stein

Permissions?

Are you running from a network share? If so you need to set the security in the .config file to allow remote operation.
You can try using Run As Administrator to see if that fixes it.

+++ Rick ---



On one of my client sites we are getting the following error when trying to instantiate the proxy object:

Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\Windows\TEMP\27l8yq5w.0.cs' could not be found
error CS2008: No inputs specified

I think this is triggered by the oBridge.createinstance call that loads the COM class.

This proxy loads fine on other client sites. Why would it be looking for a temporay C# source file in this case?

Any assistance would be appreciated.

--stein












Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles