Monday, March 26, 2012

ASP.NET AJAX Beta 2 + ASMX Web Services = Parser Error !?!

Hi, I have my Web Services set up which works before ASP.NET AJAX installed. Now I am experiencing Parser Error when accessing my asmx web service.

My web.config is left untouched for the web services. The problem could be that the Web services is in the sub folders of my ASP.NET 2.0 + ASP.NET AJAX website. Please someone guide me on how to fix this error. It's quite urgent. Thanks!

Error Details:

System.InvalidOperationException: Failed to handle request. --> System.InvalidOperationException: Unable to handle request. --> System.Exception: Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified. --> System.Web.HttpParseException: Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified. --> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Preview' or one of its dependencies. The system cannot find the file specified.

File name: 'Microsoft.Web.Preview'

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.AssemblyInternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.Load(String assemblyString)

at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail)

at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail)

at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistrationCore(TagNamespaceRegisterEntry nsRegisterEntry)

at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(ArrayList nsRegisterEntries)

WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I feel that you need to install Ajax Futures CTP in your PC and the error message indicates that there is noMicrosoft.Web.Preview.dll to refer in your website.Try to check if you haveMicrosoft.Web.Preview.dllin the bin folder of your ajax website.If not,try to install ajax Futures Nov CTP first and add it to the bin folder.
Besides,try to read this thread?-http://forums.asp.net/1476672/ShowThread.aspx#1476672 if there is?any failure to call web service method.
Wish the above can help you.
Thanks! I added the needed dll into the bin folder and that fixed the problem. Thanks! It seems strange when I tested on my machine, things work but on the server it doesn't. Probably because of the inheritance of the web.config.
Try to check the permissions in the deployed server. Right mouse click virtual directory to addNetwork Service account and chooseProperties. Try to setexecute permissionsfor "Scripts only" or "Executable and Scripts"in the Virtual Directorypanel.Besides,try to set Trusted Level = Full.

No comments:

Post a Comment