a

>>Help>> Unable to add reference to the dll
Pages: 1   reply
Author Unable to add reference to the dll
guest
Total Posts:
Unable to add reference to the dll
2/6/2006 12:55:43 PM

Hi,

I downloaded NeatUpload-1.1.2.tar.gz and tested it by extracting it to a virtual folder. demo works fine. but when i try to add a reference to the dll file in the bin directory, I get an error saying one or more of the dependencies required by the assemby were not installed or not found. Also I am not able to build the project in Visual Studio. When I open Demo.aspx in Visual Studio I can only view html. I cannot switch to design view. I get compile error saying "The parent file, 'NeatUpload\Progress.aspx', for file 'ProgressPage.cs' cannot be found in the project file." and a popup message says somthing like "Class does not inherit from the class that can be visually designed." The file I downloaded is about 259KB.

Can you please help me out.

Riyaz

 


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/6/2006 4:06:27 PM
I downloaded NeatUpload-1.1.2.tar.gz and tested it by extracting it to a virtual folder. demo works fine. but when i try to add a reference to the dll file in the bin directory, I get an error saying one or more of the dependencies required by the assemby were not installed or not found.

Hmmm.   The assembly depends on the 1.0.5000.0 versions of System, System.Web, System.XML, and System.Design.  Perhaps you only have newer versions installed with your version of VS.  What version of VS are you using?  If you are using VS 2005, did you upgrade to VS 2005 from an earlier version of VS, or is VS 2005 the first version you've installed? 

Also I am not able to build the project in Visual Studio. When I open Demo.aspx in Visual Studio I can only view html. I cannot switch to design view.

That is somewhat by design.  Demo.aspx.cs isn't actually compiled into the assembly, so Demo.aspx doesn't refer to it using the Codebehind attribute.  Instead it uses the Src attribute, which causes the Demo.aspx.cs to get compiled at runtime.  I did that to make it easier for people to copy Demo.aspx and Demo.aspx.cs and experiment with them without needing to worry about conflicting with a built-in Demo class.

I get compile error saying "The parent file, 'NeatUpload\Progress.aspx', for file 'ProgressPage.cs' cannot be found in the project file." and a popup message says somthing like "Class does not inherit from the class that can be visually designed."

That's a bug in NeatUpload.csproj.  Thanks for reporting it.  NeatUpload-1.1.3.zip should contain the fix.

Please let me know if the above helps,

--Dean


 
guest
Total Posts:
Re: Unable to add reference to the dll
2/6/2006 11:13:14 PM

Hi Dean,

Thanks a lot for the quick reply. I shall download the NeatUpload-1.1.3.zip file and let you know if this helps.

I'm using VS .NET 2002 version of Visual Studio. I had modified NeatUpload.csproj so that I'm able to open the project in VS .NET 2002. For this I used the utility available at http://www.codeproject.com/macro/vsconvert.asp.

Meanwhile, I tried to use NeatUpload-1.0.17 version. I was able to add this to the toolbox. But only InputFile Control was added. When I drag and drop the InputFile control on my WebForm, I get an error saying unable to create control.

Thanks a lot again.

Riyaz 


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/6/2006 11:54:30 PM
I'm using VS .NET 2002 version of Visual Studio. I had modified NeatUpload.csproj so that I'm able to open the project in VS .NET 2002. For this I used the utility available at http://www.codeproject.com/macro/vsconvert.asp.

Thanks for the link.  I've updated the documentation to note the need to convert and rebuild NeatUpload for use with VS2002.

Meanwhile, I tried to use NeatUpload-1.0.17 version. I was able to add this to the toolbox. But only InputFile Control was added. When I drag and drop the InputFile control on my WebForm, I get an error saying unable to create control.

The 1.0.x series does not offer designer support.  I added that feature in the 1.1.x series.

--Dean


 
guest
Total Posts:
Re: Unable to add reference to the dll
2/7/2006 10:58:03 AM

I downloaded the 1.1.3 version of the NeatUpload. Still I could not add ref. of the dll to my project. I'm using following versions of the dlls:

System.Web - 1.0.5000.0

System - 1.0.5000.0

System.Xml - 1.0.5000.0

System.Drawing - 1.0.3300.0

System.Design was not found in the dependency list.

I dont know what these version mean to you. I am able to run Demo.aspx. But not able to add the controls to my application.

Neither I was able to open the project (NeatUpload solution) in VS .NET 2002 even after using VSConvert Utility. I get errors saying the application NeatUpload.csproj and HashedInputFile..csproj was not installed.

Hope this helps you to help me out.

Thanks.

Riyaz.


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/7/2006 12:47:52 PM

I downloaded the 1.1.3 version of the NeatUpload. Still I could not add ref. of the dll to my project. I'm using following versions of the dlls:

System.Web - 1.0.5000.0

System - 1.0.5000.0

System.Xml - 1.0.5000.0

Those are the versions in your GAC right?  That explains why you can run the Demo.  I think VS2002 won't let you add the reference because it looks in a different place for the referenced assemblies.  That's why you will continue to need to rebuild NeatUpload to use it in VS2002.

System.Drawing - 1.0.3300.0

System.Design was not found in the dependency list.

FYI, it looks like neither of those two is actually required.

Neither I was able to open the project (NeatUpload solution) in VS .NET 2002 even after using VSConvert Utility. I get errors saying the application NeatUpload.csproj and HashedInputFile..csproj was not installed.

Did you convert just NeatUpload.sln or did you also convert NeatUpload.csproj and HashedInputFile/HashedInputFile.csproj?  For simplicity, try just converting NeatUpload.csproj and building that in VS.  Let me know how that goes.

--Dean



 
guest
Total Posts:
Re: Unable to add reference to the dll
2/8/2006 2:39:12 PM

Hi Dean,

Thanks a lot for the reply. Finally Success! I converted only NeatUpload.csproj to VS2002. and tried to build. However, I had to comment a few lines to make the project build without errors.

I commented line 205 (HttpContext.Current = savedContext;) in UploadHttpModule.cs file, to prevent error: E:\NeatUpload\UploadHttpModule.cs(205): Property or indexer 'System.Web.HttpContext.Current' cannot be assigned to -- it is read only

Also, commented everywhere (throw new XmlException("Unrecognized tag name: " + tagName);) to prevent error :E:\NeatUpload\Config.cs(191): 'System.Xml.XmlException.XmlException(string)' is inaccessible due to its protection level

And commented everywhere ([AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]

[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]) to prevent the error: E:\NeatUpload\DetailsSpan.cs(32): The type or namespace name 'AspNetHostingPermissionAttribute' could not be found (are you missing a using directive or an assembly reference?)

After this, the code could build successfully with following warnings:

1)warning CS1607: Assembly generation -- The version 'trunk' specified for the 'product version' is not in the normal 'major.minor.build.revision' format

2)E:\NeatUpload\AssemblyInfo.cs(43,10): warning CS1030: #warning: 'LOGGING DISABLED. To enable logging, add a reference to log4net and define USE_LOG4NET.'

I dont have any idea what consequences these changes made by me would have, but I was able to add reference to the dll in my application. Also, was able to add controls to the toolbox. And I am able to run the basic uploading functionality with inline/popup progressbar. Could you please let me know, how to get rid of these errors and warnings?

Also, I would be glad if you please tell me how the controls DetailsSpan and DetailsDiv can be used?

I could not run the HashedDemo.aspx page. I converted HashedInputFile.csproj to VS2002 so as to open it in VS. But in this case, I had to remove and re-add the reference to NeatUpload dll to this project, as it showed a warning icon next to it in the Solution Explorer. Also, when I try to open HashingFilesystemUploadStrorageProvider.cs, I get an error that the file does not exist or might have been renamed/moved/deleted. A warning icon is shown against HashingFilesystemUploadStrorageProvider.cs also.

I did not build HashingInputFile project. I am not sure if this is required. Does it get built with NeatUpload or something?

I could add HashingInputFile control to my toolbox. But I havent tested its functionality yet. I shall revert back to you in case I'm stuck.

I really appreciate the efforts you have put in to create and then support this control. Great work!! Thanks a lot again.

Riyaz


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/8/2006 4:39:48 PM
Finally Success!

Great!  Thanks for letting me know what you needed to change.

I commented line 205 (HttpContext.Current = savedContext;) in UploadHttpModule.cs file, to prevent error: E:\NeatUpload\UploadHttpModule.cs(205): Property or indexer 'System.Web.HttpContext.Current' cannot be assigned to -- it is read only

I don't think that will be a problem, but I'm not positive.  If it causes a problem, it would be limited to pages that redirect/transfer, applications that use other HttpModules, or applications that register HttpApplication event handlers (eg via Global.asax.cs).  If your app falls into any of those categories, you might want to test that functionality.

Also, commented everywhere (throw new XmlException("Unrecognized tag name: " + tagName);) to prevent error :E:\NeatUpload\Config.cs(191): 'System.Xml.XmlException.XmlException(string)' is inaccessible due to its protection level

That won't cause any problems.  It just won't complain about any errors you make in the config file.  To catch such errors, you could just change XmlException to ApplicationException or Exception.

And commented everywhere ([AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]

[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]) to prevent the error: E:\NeatUpload\DetailsSpan.cs(32): The type or namespace name 'AspNetHostingPermissionAttribute' could not be found (are you missing a using directive or an assembly reference?)

I thought that was necessary for the Designer stuff to work, but maybe that's only true with VS 2003 and later.  If you can drag and drop the controls onto your forms without it, then you don't need it.

After this, the code could build successfully with following warnings:

1)warning CS1607: Assembly generation -- The version 'trunk' specified for the 'product version' is not in the normal 'major.minor.build.revision' format

2)E:\NeatUpload\AssemblyInfo.cs(43,10): warning CS1030: #warning: 'LOGGING DISABLED. To enable logging, add a reference to log4net and define USE_LOG4NET.'

Those are both fine.  You can safely ignore them.

Also, I would be glad if you please tell me how the controls DetailsSpan and DetailsDiv can be used?

See Customizing Progress.aspx.

I could not run the HashedDemo.aspx page. I converted HashedInputFile.csproj to VS2002 so as to open it in VS. But in this case, I had to remove and re-add the reference to NeatUpload dll to this project, as it showed a warning icon next to it in the Solution Explorer.

That doesn't suprised me.  It's probably because it expected to link to the version that was included in the release.

Also, when I try to open HashingFilesystemUploadStrorageProvider.cs, I get an error that the file does not exist or might have been renamed/moved/deleted. A warning icon is shown against HashingFilesystemUploadStrorageProvider.cs also.

Hmm.  That file should be in your NeatUpload-1.1.3\HashedInputFile folder.  If it isn't, perhaps the filename was too long for your zip program, OS, or VS2002 to handle?  If there is file with a truncated version of that name in the HashedInputFile folder, try renaming it to something like HashingFsUploadStorageProvider.cs and adding that file to the project in VS2002.

I did not build HashingInputFile project. I am not sure if this is required. Does it get built with NeatUpload or something?

HashedInputFile is definitely not required.  It is just an extension that computes the cryptographic hash of the files as they are uploaded.  If you don't need that functionality, you can completely ignore HashedInputFile.  For more info on HashedInputFile, see The HashedInputFile Extension.

Cheers,

--Dean

 
guest
Total Posts:
Re: Unable to add reference to the dll
2/9/2006 12:08:34 AM

Hi Dean,

Thanks for the reply.

That file should be in your NeatUpload-1.1.3\HashedInputFile folder.  If it isn't, perhaps the filename was too long for your zip program, OS, or VS2002 to handle?  If there is file with a truncated version of that name in the HashedInputFile folder, try renaming it to something like HashingFsUploadStorageProvider.cs and adding that file to the project in VS2002.

The file HashingFilesystemUploadStrorageProvider.cs is indeed there in the folder, and with correct name. To be sure I opened the HashingInputFile.csproj file in notepad and checked the spelling. Its correct. But still VS is unable to recognize it. Not sure why?

Thanks again.

Riyaz


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/9/2006 12:25:40 AM
VS2002 must fail to recognize such long names then.  If you don't need HashedInputFile, you can just ignore the whole problem.  But, if you feel like trying to shorten the name of the file and adding it to the project to see if that makes a difference, I'd love to know.

--Dean

 
guest
Total Posts:
Re: Unable to add reference to the dll
2/9/2006 11:28:48 AM

Hi Dean,

I removed and re-added all the files in the HashedInputFile project. I was able to build this solution now. I am now able to use the HashedInputFile control in my application. Changing the long filename wasn't really needed.

One thing is not clear to me. What do u really mean by computing hash of the file. Does it compute hash of the file contents or what? If so, with what does it compare the hashed value? does it compute hash on the client and server and then compare? I mean how does it ensure that file has been correctly uploaded?

Also, what is meaning of Hash size?

Thanks a lot.

Riyaz

 


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/9/2006 11:51:28 AM
I removed and re-added all the files in the HashedInputFile project. I was able to build this solution now. I am now able to use the HashedInputFile control in my application. Changing the long filename wasn't really needed.

Good to know.  Thanks.

One thing is not clear to me. What do u really mean by computing hash of the file. Does it compute hash of the file contents or what?

Yes.  Hash of the file contents.  It uses SHA1 by default.

If so, with what does it compare the hashed value? does it compute hash on the client and server and then compare? I mean how does it ensure that file has been correctly uploaded?

It doesn't.  The user would need to know the correct hash value.  He could either send it along with the file for you to compare in the code behind, or you could display it and the user could compare it manually.  Alternatively, you could write client-side software that computes the hash.  That is what ForeverStor (the company that funded  development of HashedInputFile) did.

Also, what is meaning of Hash size?

It's the number of bits in the hash.  For example, SHA1 computes a 160-bit hash (I think).  So HashSize is 160 (bits), and Hash.Length is 20 (bytes).  You really only care about HashSize if you are using an algorithm that produces a hash that is not a multiple of 8-bits long.

--Dean


 
guest
Total Posts:
Re: Unable to add reference to the dll
2/9/2006 2:51:04 PM

Hi Dean,

That seems great. I would love to write Client side hash utility. Will post it if I'm successful.

You have been really of tremendous help. Thanks a lot for your continual support and enthusiastic help. The control has really saved a lot of development time.

Thanks again.

Riyaz


 
Dean Brettle
Total Posts: 2015
Re: Unable to add reference to the dll
2/9/2006 5:22:11 PM
FYI, there is another thread about writing client code that uploads to NeatUpload.  I recommend reading it before you start.

--Dean

 
guest
Total Posts:
Re: Unable to add reference to the dll
2/9/2006 11:47:26 PM

Thanks a lot Dean for the information. will let u know as I progress. :-)

Riyaz

 

 


 
Pages: 1   reply
a