Could not load type 'Lync.Widget.Service.Global'

Aug 24, 2011 at 1:02 PM

HI,

i'm getting the next event on the iis server:

Event code: 3006
Event message: A parser error has occurred.
Event time: 8/24/2011 2:42:54 PM
Event time (UTC): 8/24/2011 11:42:54 AM
Event ID: 2a4b29d42b2a46ef8a1cd81b1343fe96
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/2/ROOT-319-129586597743919500
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\inetpub\lync presence service\
    Machine name: PS-IIS
 
Process information:
    Process ID: 1784
    Process name: w3wp.exe
    Account name: IIS APPPOOL\lyncpresence
 
Exception information:
    Exception type: HttpException
    Exception message: Could not load type 'Lync.Widget.Service.Global'.
   at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

Could not load type 'Lync.Widget.Service.Global'.
   at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
   at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
   at System.Web.UI.TemplateParser.Parse()
   at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
   at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
   at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp)
   at System.Web.Compilation.BuildManager.CompileGlobalAsax()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

Could not load type 'Lync.Widget.Service.Global'.
   at System.Web.UI.TemplateParser.ProcessException(Exception ex)
   at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
   at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

Could not load type 'Lync.Widget.Service.Global'.
   at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
   at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
   at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)

 
 
Request information:
    Request URL: https://lyncservice.pslab.local:443/service.svc/GetPresences?sipUris=sip:elad@pslab.com,sip:roni@pslab.com&r=0.35889474559053735&callback=jQuery161040977632235460026_1314185774948&_=1314186198932
    Request path: /service.svc/GetPresences
    User host address: 10.70.150.143
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: PSLAB\adminservice
 
Thread information:
    Thread ID: 5
    Thread account name: PSLAB\adminservice
    Is impersonating: False
    Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
 
 
Custom event details:

what am i doing wrong?

Coordinator
Aug 25, 2011 at 1:10 PM

Please post a screenshot of the /bin/ folder of the folder where you deployed the WCF service to.

Some things you can try:

- check if the app pool has the correct .net version
- Could you try renaming the web.config to oldweb.config and see if you get another exception then? If so, the problem is probabily in your web.config.
- Please also check if you have configured the virtual dir in IIS as an application.
- If both these things seem ok, please try with an empty WCF service (of the same .NET version) to see if the IIS is set up correctly. (create new WCF service solution and put it into IIS without changing anything)

Aug 28, 2011 at 12:30 PM
Edited Aug 28, 2011 at 12:47 PM
here is the bin folder screenshot:
bin folder
 
well, now i'm getting the following event:
 

WebHost failed to process a request.

Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/39449526

Exception: System.ServiceModel.ServiceActivationException: The service '/service.svc' cannot be activated due to an exception during compilation. The exception message is: Exception has been thrown by the target of an invocation.. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Rtc.Collaboration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

at Lync.Widget.Service.Service.StartPresenceQueryService()

at Lync.Widget.Service.Service..ctor() in C:\Lync Widget\src\Lync.Widget\Lync.Widget.Service\Service.svc.cs:line 30     <=what is this path?

--- End of inner exception stack trace ---

at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)

at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at System.ServiceModel.Description.ServiceDescription.CreateImplementation(Type serviceType)

at System.ServiceModel.Description.ServiceDescription.GetService(Type serviceType)

at System.ServiceModel.ServiceHost.CreateDescription(IDictionary`2& implementedContracts)

at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)

at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)

at System.ServiceModel.Activation.WebServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses)

at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

--- End of inner exception stack trace ---

at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)

Process Name: w3wp

Process ID: 2720

 

I'm guessing that I need a step-by-step guide that will helping me build the site as it should be...

Coordinator
Aug 29, 2011 at 4:04 PM

I read: Could not load file or assembly 'Microsoft.Rtc.Collaboration, Version=4.0.0.0

Do you have a Lync Client installed on this machine? You should. 

Either way, you will need to get that assembly somehow.

 

About the path: That is the path on my machine where the code is compiled from, retrieved from the .pdb in the bin folder (as a debugging aid). This will not be the issue. You can do a rebuild of the service project in visual studio to get your own path if this bothers you..

Aug 30, 2011 at 6:54 AM

 

Already tried to install the client on the IIS server.

 I have some questions:

 1. Is the application server has to answer me via telnet port 10607?
    cause right now I do not get any answer
 
 2. Is there any way that I can identify if the problem comes from the Lync, IIS, or the application server?

Oct 5, 2011 at 8:31 AM

Hello,

i also get same error, but i do not have /bin/ folder. Where can i get one and what files should be there?

Oct 5, 2011 at 8:49 AM

so now i know that i have to build it with visual studio (thanks to Thomas Stock).

Oct 5, 2011 at 10:22 AM
Edited Oct 5, 2011 at 10:37 AM

delete this message

Oct 21, 2011 at 8:41 AM
Edited Oct 21, 2011 at 8:52 AM

Is there anyway somebody can tell me what i have to build with visual studio. I want to use the lyncwidget but i get stuck at implementing WCF. Never done that before.

Oct 21, 2011 at 9:17 AM
MaartenFollender wrote:

Is there anyway somebody can tell me what i have to build with visual studio. I want to use the lyncwidget but i get stuck at implementing WCF. Never done that before.

yes. You have to build it with visual studio. Just open the project and build it. In "bin" folder should appear some .dll files.

Oct 21, 2011 at 12:48 PM

Thnx, have got it now

Oct 21, 2011 at 12:48 PM

Thnx, have got it now

Oct 21, 2011 at 12:48 PM

Thnx, have got it now

Oct 21, 2011 at 5:42 PM

Well, now i get the following error

 

WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: SIPEPS | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/inetpub/Lync.Widget.Service/
LOG: Initial PrivatePath = C:\inetpub\Lync.Widget.Service\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\Lync.Widget.Service\web.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/eeca4509/82e127b0/SIPEPS.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/eeca4509/82e127b0/SIPEPS/SIPEPS.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/Lync.Widget.Service/bin/SIPEPS.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.


Stack Trace:

[BadImageFormatException: Could not load file or assembly 'SIPEPS' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
   System.Reflection.Assembly.Load(String assemblyString) +28
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'SIPEPS' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

[HttpException (0x80004005): Could not load file or assembly 'SIPEPS' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079228
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258


 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

 

 The service is run on a windows 2008 R2 x64 server. The Lync client is installed.

What am i doing wrong?

Coordinator
Nov 14, 2011 at 9:33 AM

It seems the service is unable to load SIPEPS.dll.

Apparently it's an Exchange related dll. I never had any problems like that so I'm afraid I can only give you a link I found while googling:

http://social.microsoft.com/Forums/en/communicationsserversetup/thread/3276a3dc-5978-4863-aaf4-75bcc8f8416d

 

I hope this helps..

Nov 14, 2011 at 10:53 AM

Hi Thomas,

Thanks for the response. I got it working already. Sorry i didn’t close the call.

Kind Regards,

Maarten Follender

Van: thomasstock [email removed]
Verzonden: maandag 14 november 2011 10:34
Aan: volleybal_grasveld@hotmail.com
Onderwerp: Re: Could not load type 'Lync.Widget.Service.Global' [LyncWidget:270210]

From: thomasstock

It seems the service is unable to load SIPEPS.dll.

Apparently it's an Exchange related dll. I never had any problems like that so I'm afraid I can only give you a link I found while googling:

http://social.microsoft.com/Forums/en/communicationsserversetup/thread/3276a3dc-5978-4863-aaf4-75bcc8f8416d

I hope this helps..

Mar 10, 2012 at 3:13 PM
MaartenFollender wrote:

Hi Thomas,

 

Thanks for the response. I got it working already. Sorry i didn’t close the call.

 

Kind Regards,

 

Maarten Follender

 

 

Van: thomasstock [email removed]
Verzonden: maandag 14 november 2011 10:34
Aan: volleybal_grasveld@hotmail.com
Onderwerp: Re: Could not load type 'Lync.Widget.Service.Global' [LyncWidget:270210]

 

From: thomasstock

It seems the service is unable to load SIPEPS.dll.

Apparently it's an Exchange related dll. I never had any problems like that so I'm afraid I can only give you a link I found while googling:

http://social.microsoft.com/Forums/en/communicationsserversetup/thread/3276a3dc-5978-4863-aaf4-75bcc8f8416d

 

I hope this helps..

Hi, MaartenFollender

I am facing the same problem... Could not load file or assembly SIPEPS, Version=4.0.0.0.....

Can you tell me how to fix it..

Thanks in advance!

Mar 20, 2012 at 4:12 PM

MaartenFollender -

How did you go about getting this resolved.  Any information would help.

Thanks

Mar 23, 2012 at 3:25 PM

We had similar problems as above and we had set out webbserver's applicationpool to run in 32-bit-enabled (you see it under advanced settings).

Change it to 64-bit instead.

We did this because on of the .dll:s that are sent with the package was 32:bit only.

You just have to remove the .dll: Microsoft.Rtc.Internal.Media.dll

(It is located in the bin/ catalog of the application.)

 

Thank you for making this software available!

 

/Peter Skov, Linköping University