fsilva9

Help!!!

I'm at my wit's end.

For the past few months I've been creating a website which takes in a user's product serial number, along with another "key" string, and then generates a license. This generated license unlocks the user's appliance; it is non-functional before it's registered.

The license is generated by a COM .dll which calls the appropriate algorithms based on the user's inputs.

This code works perfectly on my laptop! When I migrated it to a true development/staging server I was not able to generate a license. I've gone through the same exact procedure that I did when installing the necessary COM .dlls on my laptop.

1. I registered the DLL

2. Added a reference in Visual Studio 2005

Nonetheless, here's the error:

Error:
System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) at
System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at
xxx.xxx.createLicenseBitString(String a_sFeatures, String a_sProductId, Int16 a_bEvaluationLicense, Int16 a_iEvalPeriod) at
xxx.xxx.GetFinalLicense(String ParamFeatures, String productID, Int16 ParamEvaluation, Int16 ParamEvalPeriod) in C:\Inetpub\wwwroot\...\LicenseDAL.cs:line 394 at xxx.xxx.GenerateLicenceKey(String productID) in
C:\Inetpub\wwwroot\...\LicenseDAL.cs:line 303 at xxx.xxx.MatchAndUpdate_ProdID_IKey(String productID, String Ikey) in
C:\Inetpub\wwwroot\...\LicenseDAL.cs:line 628 at xxx.xxx.GetLicense(String productid, String ikey, String email) in
C:\Inetpub\wwwroot\...\LicenseDAL.cs:line 526 at xxx.xxx.GetLicense(String productid, String ikey, String email) in
C:\Inetpub\wwwroot\...\License.cs:line 61 at _Products_Licensing_editAccelerator.btnSubmit_Click(Object sender, EventArgs e) in
e:\Inetpub\wwwroot\...aspx.cs:line 240

One thing to note, could this be a descrepancy in drive Letters C:\ vs. E:\

ANY ADVICE IS MUCH APPRECIATED!



Re: Visual Studio Tools for Office System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105

X4U

Hello fsilva,

it's not an VSTO issue,

however for me it seems that the COM dll cant access a network share or another COM+ component or a Webservice.

RPC -> RemoteProcedureCall

Do you have the sources to this DLL

If not maybe you can use a networkmonitor to see what the Dll tries to access.

Do you need an Internetconnection for it

If the COM dll is called from a website - the process wich is calling the dll maybe has:

- no rights to access another networkresource because it is executed with anonymous user rights

- no correct internetsettings for this useraccount

- a firewall between the webserver and the resource

Also I would check the security log on the webserver and maybe on a firewall if some access was blocked.

Hope this helps,

greets, Helmut






Re: Visual Studio Tools for Office System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105

fsilva9

Helmut,

Thanks for the quick reply.

1. Where would I check for access rights Is this the same as the machine's .NET security policy files The website assumes a user that has rights to read/write; it's not an anonymous user.

2&3. I'm running this both via the web and through the localhost that VisualStudio provides.

I've written another post which details this a little more. Here it is:





Re: Visual Studio Tools for Office System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105

Geoff Darst - MSFT

Hi,

RPC_E_SERVERFAULT means that an exception occured on the server. So in order to understand what actually happened, you'll need to debug the server. Presumably the call to LicenseKeyGeneratorClass.createLicenseBitString is the remote call. If you are saying that the LicenseKeyGeneratorClass is an in-proc server then you are probably invoking RPC due to cross-apartment marshalling. Anyway, the real exception is getting eaten by the marshalling infrastructure, so you need to attach a debugger and enable all exceptions so you can find it. If you are using the Visual Studio debugger, you will want to attach both the native and managed debuggers, turn off "just my code" in the debugger options, and enable catching of Win32, C++, and COM+ exceptions in the debugger. If you are getting too many spurious exceptions, you may need to put a breakpoint on the call to createLicenseBitString and wait to turn on exceptions until you hit the breakpoint. Anyway, grabbing the real exception may give you a better idea of what the problem is. If not, you are going to want to contact the folks who wrote your license key generator for support. That is where the exception is occuring, so they will be in the best position to help you out.

Sincerely,

Geoff Darst

Microsoft VSTO Team