Problem after Publishing

Apr 6, 2011 at 11:46 PM

I am having an issue with the file upload & Download after I publish to the server.  It all works fine in the dev environment.  When I try to upload I get a Messagebox with the title "Upload Completed" and the messsage "Upload completed with errors or some files canceled"  The Interlink File upload dialog shows "error" in the state column, and "Upload Partially completed" in the lower left corner. Clicking on the info icon does not yield any more infomation.

The server is Windows Datacenter 2008 x32/IIS7.0 w/SP1.  The Silverlight Business App is located in c:\Inetpub\wwwroot\sunlightsrp

I have inserted the following in the web.config file

<system.webServer>
 <handlers>
  <add name="FileDownload" verb="GET,POST" path="FileDownload.ashx" type="HSS.Interlink.Web.FileDownload, HSS.Interlink.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=9907eb1ad38d3903"/>
  <add name="FileUpload" verb="GET,POST" path="FileUpload.ashx" type="HSS.Interlink.Web.FileUpload, HSS.Interlink.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=9907eb1ad38d3903"/>
 </handlers>

 <appSettings>
       <!-- This value must match the Full TypeName including the namespace of your Up & Down loadHandler -->
    <add key="UploadHandler" value="bisSRP.Web.UploadHandler, bisSRP.Web" />
    <add key="DownloadHandler" value="bisSRP.Web.DownloadHandler, bisSRP.Web" />

The other WCF web services work just fine after doing something like this

Uri address = new Uri(Application.Current.Host.Source, "../WebService/FileAccessService.svc");
var svc = new bisSRP.WebServices.FileAccessServiceClient("CustomBinding_FileAccessService", address.AbsoluteUri);

 In addition to get the other WCF Web Services to work I also have to use  "ASP.NET v4.0" Application Pool.

I have tried code like this.

 ud = new UploadFileDialog(GetMetadata);
ud.UploadUri = "http://bisserver/SunlightSrp/FileUpload.ashx";

or

 ud.UploadUri = "http://bisserver/FileUpload.ashx";

No luck so far

Any Help?

 

Best Regards,

Russ

Coordinator
Apr 7, 2011 at 1:11 AM

When you go to IIS and click browse on the site, after your browser opens, what is the URL? If it's something like http://bisserver/default.aspx then http://bisserver/fileupload.ashx is the correct url so you shouldn't have to modify the default uri on the client. On your bisSRP.Web.UploadHandler class, in the OnError method, log the error so you can see what is happening. Also, make sure you have IIS configured for ASP.NET 4.0. You should have two AppPools (ASP.NET 4.0 AND ASP.NET 4.0 Classic in addition to any you've created) if it's confgured properly. If it's not, when click on the Server Name in the IIS Explorer tree, there usually is an Action Link on the far right pane that says "Configure ASP.NET 4.0" or something like that.

Once you trap the error, that should give a better indication as to the root cause. Let me know what you find and I'll help.

Apr 7, 2011 at 3:14 PM
Edited Apr 7, 2011 at 3:52 PM

Thank you for your prompt reply.

After unsuccessfully attempting to write a message to the event log from the OnError event in the FileUpload class, I began to realize that I may have a permissions problem.

Since I do my own authentication, I realized that I needed to enable ASP.NET impersonation.  That did the trick.

Once more the problem was found between my keyboard and my chair.

 

Best Regards,

Russ