Select to view content in your preferred language

Errors in a deployed Silverlight project

5095
14
01-15-2015 06:11 AM
ShaningYu
Frequent Contributor

I tried to deployed a SL project in IIS 7 by following the procedure by ESRI: 39169 - Deploy a Silverlight application to IIS 6.0 and 7.0‌ .  After the deployment, I opened the project's htm on IE.  The interface looks fine.  But I run the query, a bunch of errors show up.  Some of the errors are listed below:

Locator service failed: System.Security.SecurityException ---> System.Security.SecurityException: security error

at System.Net.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncresult asyncResult)

at System.Net.BrowserHttpWebRequest ...

...

It appears it involves some security issue.  What should do to solve these problems.  Thanks.

0 Kudos
14 Replies
ShaningYu
Frequent Contributor

Re-tested in multiple scenarios but still have problems.  In IIS7, for the previous version, if I right-click the application > Manager > Browser, the page shows http://localhost/xxx, and it runs well.  If I change the localhost to the URL, the start interface looks to be fine.  However, when I runs the query, the errors (as reported above) pop out.  I also tried another server, and have the same problem.

In IIS 7 also tried to add the new version (just built one) as another application with the same settings.  But when I tested the Settings (e.g. physical path:  C:\inetpub\wwwroot\AppName, Appilicaqtion Pool: ASP.Net v4.0), I got such an error: "There was an error while performing this operation Details: Invalid application path.

Hopefully, I can get some additional hints for solving the problems.  Thanks.

0 Kudos
DominiqueBroux
Esri Frequent Contributor

The security Policy file is needed on the target server, not on the server hosting the application (however this can't hurt).

It's why I asked you about the URL of your Locator server (or of the server the queries fail).

You might also run into a cross zone access issue if the target server  is in a more restrictive zone than your SL application server.

0 Kudos
ShaningYu
Frequent Contributor

Dominique:  Thanks for you response.  Through multiple tests, I am sure it is not the crossdomain issue.  The problem is that in II7 Manager I can't convert it to an application.  The error I received is "Invalid application path".  Could you provide your additional advisory for solving the problem?  Thanks.

0 Kudos
ShaningYu
Frequent Contributor

By referring to the procedure: http://stackoverflow.com/questions/7939693/iis-7-invalid-application-path-win-7 , I created a Virtual Directory in IIS7.5 Manager's Web Sites, and then set the Physical Path.  The project was got deployment.  However, I still can't run the query if the page uses URL address rather than localhost.  In this server, there are other multiple applications that have no problem using URLs.  Any suggestion for this problem?  Thanks.

0 Kudos
ShaningYu
Frequent Contributor

Had a communication w/ a professional.  He said the problem was not due to the security or cross domain issue.  The problem was that the IP address was not recognized.  Then, I changed the http://IPAddress/MyApp to http://myComputerName/MyApp.  The errors were gone.  What settings should I do in order to use IP address in this application?  Thanks.

0 Kudos