This is a migrated thread and some comments may be shown as answers.

Async Upload not working under IIS - NullreferenceExeption in Compress

7 Answers 299 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Markus Hopfenspirger
Top achievements
Rank 2
Markus Hopfenspirger asked on 03 Jul 2011, 03:45 PM
Hi,

I'm just playing around with the newest Version of the Rad Controls because I want to upgrade. But I can not get the async Upload working on the Server. Locally and if the browser is on the server itselve everything is working fine. But as soon as I acces the Page from outside the following Unhandled Exception is logged into the eventlog:

- Windows Server 2008
- The appPool is running in integrated mode as Networkservice.
- Networkservice has full control to the App_Data folder.
- In the Temporary Folder the full file is saved correctly
- I Switched on and off silverlight an flash AddOns on the client without a difference
- Happens in all browser (IE9 FF chrome safari) and works on all if started directly on the server...???

Any suggestions what I could have missed?

Kind regards from Germany,
Markus

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 03.07.2011 16:33:44
Event time (UTC): 03.07.2011 14:33:44
Event ID: 761ad93a40cc4dc4ab5767e64af73d63
Event sequence: 1937
Event occurrence: 6
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/16/ROOT-6-129541759904615022
    Trust level: Full
    Application Virtual Path: /
    Application Path: D:\inetpub\wwwroot\mytgaOffline.mahop.net\
    Machine name: KM35925
 
Process information:
    Process ID: 4132
    Process name: w3wp.exe
    Account name: NT-AUTORITÄT\NETZWERKDIENST
 
Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.
   at System.Object.GetType()
   at Telerik.Web.UI.RadCompression.Compress(HttpApplication application)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 
 
Request information:
    Request URL: http://mytgaoffline.mahop.net/?RadUrid=d2bc3ea4-e58a-42b3-9cff-a8e1b81dcdbe
    Request path: /
    User host address: 88.217.25.192
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: NT-AUTORITÄT\NETZWERKDIENST
 
Thread information:
    Thread ID: 18
    Thread account name: NT-AUTORITÄT\NETZWERKDIENST
    Is impersonating: False
    Stack trace:    at System.Object.GetType()
   at Telerik.Web.UI.RadCompression.Compress(HttpApplication application)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details:

7 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 07 Jul 2011, 08:48 AM
Hi Markus,

I am not sure that this error is related to RadAsyncUpload, it is more likely an issue with RadCompression and should be reproducible with all controls. In order to verify whether this is the case could you please check the following:

1) Is it possible to reproduce the error on pages that does not contain RadAsyncUpload?
2) If the problem is reproducible on a page with RadAsyncUpload upon commenting out the latter does the issue persist?
3) Is the issue reproducible all the time or only on specific occasions?

All the best,
Genady Sergeev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 07 Jul 2011, 12:19 PM
Hello Genady,

Thank you for your reply!

I was testing around for quite some time and I found a bug in my code. I solved it an the problem was gone. Now I deployed a new version and the problem is back...But this time I don't have a bug in my code...???

I'm not 100% sure if this is a Telerik Problem, but it stays very strange! Because it happens between the point when an upload of a file is finished and the call of the Upload Completed handler.... So I have no change to catch it...

How can I test this without having an asyncupload control on the page?

Kind regards,
Markus
0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 08 Jul 2011, 11:10 AM
Hello Genady,

just to inform you: after the last update I askes a couple of friends to test the File upload. About 50% of them are getting the error...??? For all others it is working perfectly...??? They all deactivated silverlight and flash and activated it again - without any difference...

I'm adding the upload Control from Code Behind in the page_load event to the page. Makes this any difference?

Kind regards,
Markus
0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 09 Jul 2011, 05:41 AM
Hello Genady,

Maybe I found the problem.

Normaly I develop ASP.net Projects with the MVVM Pattern. So I out the Views in a seperate Assembly. Than I have some Framework Assemblies containig Builders for HTML Code. So I seperate the Coed in a couple of Assemblies. And this is what probably caused the problem. If I put all the Code in the main Web assembly everything is working fine. The hint was one exception, occured during a request...

But what to do now. I don't want to refactor the code in al my projects.... Is there a different solution for this? Do you have any ideas? 

Exception information: 

Exception type: ConfigurationErrorsException

Exception message: Could not load file or assembly 'MyTga.ExcelKonverter.WebEngine' or one of its dependencies. Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird. (Exception from HRESULT: 0x80070020)

at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()

at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()

at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)

at System.Web.Compilation.BuildManager.CallPreStartInitMethods()

at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

Could not load file or assembly 'MyTga.ExcelKonverter.WebEngine' or one of its dependencies. Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird. (Exception from HRESULT: 0x80070020)

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

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

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

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

at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

Request information:

Request URL: http://mytgaoffline.mahop.net/Telerik.RadUploadProgressHandler.ashx?RadUrid=1c827986-98aa-4e1a-98e2-c9eda5c6029a&RadUploadTimeStamp=1310184910726&

Request path: /Telerik.RadUploadProgressHandler.ashx

User host address: 87.118.86.208

User:

Is authenticated: False

Authentication Type:

Thread account name: NT-AUTORITÄT\NETZWERKDIENST

Thread information:

Thread ID: 30

Thread account name: NT-AUTORITÄT\NETZWERKDIENST

Is impersonating: False

Stack trace: at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()

at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()

at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)

at System.Web.Compilation.BuildManager.CallPreStartInitMethods()

at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

 

0
Genady Sergeev
Telerik team
answered on 14 Jul 2011, 09:15 AM
Hello Markus Hopfenspirger,

Thank you for clarifying this. Looking at the exception received I notice that it was request to the progress area handler. What happens if you comment out the area? Which is the HTTP Error code which is thrown upon failed upload? This can be checked using a tool like fiddler.

It also seems that there is a assembly load problem. What is the WebEngine assembly doing? It seems that you project fails to load it upon a request to Telerik.RadUploadProgressHandler.ashx, which is a handler used for progress monitoring (it requires full access to HttpContext).

Kind regards,
Genady Sergeev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Markus Hopfenspirger
Top achievements
Rank 2
answered on 14 Jul 2011, 09:48 PM
Hello Genady,

The WebEngine is rendering everything. I programm Web Projects in a Way that the main Web project is very small. Only one almost emtpy default.aspx with a call to the Engie Project in the Code Behind. In the Engine Class there is all code for rendering all content...

Right now I'm redirecting from the default.aspx to a second page and donig there the stuff I did before in default aspx. I have no clue why this makes a differend, but right now the problem is gone...??? I will look at the HTTP Error Code with fiddler if the problem happens again.

I will also switch to Q2 over the weekend... So maybe things are better there...

Thanks for your help!!!
As soon as the problem occurs again I will try you suggestions and post the Fiddler results here.

Nice greetings from germany,
Markus
0
Genady Sergeev
Telerik team
answered on 19 Jul 2011, 03:10 PM
Hi Markus Hopfenspirger,

Thank you for the feedback. We will keep an eye on the thread for updates.

Regards,
Genady Sergeev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
AsyncUpload
Asked by
Markus Hopfenspirger
Top achievements
Rank 2
Answers by
Genady Sergeev
Telerik team
Markus Hopfenspirger
Top achievements
Rank 2
Share this question
or