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

Having problem when Casting

1 Answer 45 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Canis Lupus
Top achievements
Rank 1
Canis Lupus asked on 14 Mar 2011, 11:30 PM
I am trying to use your sample AsyncUpload / Custom Handler

I am getting Exception when I try to cast following code.

Dim sampleConfiguration As SampleAsyncUploadConfiguration = New SampleAsyncUploadConfiguration
 
        Try
            sampleConfiguration = CType(configuration, SampleAsyncUploadConfiguration)
        Catch ex As Exception
 
        End Try
         
        If sampleConfiguration IsNot Nothing Then
            postID = sampleConfiguration.postID
        Else

Here is the ex text:

+                             ex           {"[A]SampleAsyncUploadConfiguration cannot be cast to [B]SampleAsyncUploadConfiguration. Type A originates from 'App_Web_xauu0n21, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Users\myPC\AppData\Local\Temp\Temporary ASP.NET Files\mysite\b2f60de7\7f7ee92\App_Web_xauu0n21.dll'. Type B originates from 'App_Code.e2pu7rre, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Users\myPC\AppData\Local\Temp\Temporary ASP.NET Files\mysite\b2f60de7\7f7ee92\App_Code.e2pu7rre.dll'."}                System.Exception


Because of this ex, I get nothing in the "sampleConfiguration"

Any work around to fix the problem?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Canis Lupus
Top achievements
Rank 1
answered on 15 Mar 2011, 12:10 AM
Fixed it nevermind :)
Tags
AsyncUpload
Asked by
Canis Lupus
Top achievements
Rank 1
Answers by
Canis Lupus
Top achievements
Rank 1
Share this question
or