I have an ASP.NET web application (.NET 4.0) that has a few pages, one page with a silverlight application in it.
When I debug locally, the silverlight app works fine. When I deploy to my web server (Windows Server 2008 R2, IIS 7.5), the silverlight app will not display.
I get an exception in Application_Error saying the following files are missing:
clientaccesspolicy.xml
crossdomain.xml
I have found a few things on the net that aren't very helpful - they say they need to be in C:\inetpub\wwwroot. I don't have a 'Default' website in IIS7.5 and I don't have these folders?
Where can I find them and where should I put them?
Please help, as this is very urgent. Many thanks.
EDIT: So I have tried doing what the link in my comment suggests. Some more info: I have a Silverlight-enabled WCF service that the Silverlight app uses in order to work.
Do I need to do anything special when deploying my app with an .svc file? I remember having to enable access to .svc files back in IIS5, but I don't know if that's necessary in IIS 7.5?
Hope this extra info helps. If you need any code snippets etc, let me know.
Thanks.
Well, worked it out - a slightly embarrassing and annoying problem..............
The service reference in the Silverlight application had a client address of 'http://localhost......', which was added by Visual Studio when I added the service reference.
I found a blog post by Tim Heuer describing the issue. I had to set the client address to a relative one, using '../Service.svc' in the ServiceReferences.ClientConfig.
Very annoying, sort that out please Microsoft!!!
Related
What happens?
I publish a website to UnoEuro on a windows server.
When I do I keep getting the error message:
"HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid."
What have I set up/tried?
What I've done is that I've created a .NET Core 2.1 Web API which hosts fine locally on my computer using IIS. I have then published the web api to the hosting site UnoEuro where I can see that the files are uploaded as they should be.
I asked the hosting sites support, they told me to just ensure that it was deployed as self-contained but that otherwise they could not help further. It looks like there is a hosting issue of some sort related to that it cannot seem to find the webconfig file. At least that's what the error message says.
Is there any form of setup I should make? A configuration I should change? Should I set up some SSL settings in the web API which I might have missed? When I started the project I told it to enforce HTTPS, but surely I should get another error message if that was the fault?
I've tried publishing with the target runtime set to both x64 and x86.
I've never published an API like this to anything but Azure before, so I might be doing a thing or two wrong but I cannot see what it should be? I have Googled around but not found anything that seems relevant which has worked.
Most of the solutions seem related to changing the server environment which I don't have so much control over, I mostly just have control over the application/web api, at least that's what it looks like to me.
Hope you have any suggestions, I'm all eyes n ears.
Side question: Should I use IIS Manager for this? I'm currently publishing through Visual Studio 2017.
Images for further understanding
Publishing settings
Deployed/published files
Error message I get
EDIT:
I tried moving the files to /public_html on the same domain as ISS Manager seemed to indicate it expected the config file to be there.
That then resulted in a different error message as you see below.
Link from error message: https://go.microsoft.com/fwlink/?LinkID=808681
It's hard to say exactly, but I think the issue is that the ASP.NET Core hosting bundle is not installed on the server. There's two pieces to hosting in IIS. First, you need the .NET Core runtime, and then you need the ASP.NET Core hosting module for IIS. Deploying as self-contained buys you the runtime, but not the hosting module in IIS. There's non-standard sections in the Web.config created by publishing an ASP.NET Core app. The hosting module shims in support in IIS for these config sections (among other things). Therefore, the config error seems to imply that this is not happening.
If you don't control the server, there's not much you can do about it. Honestly, at this point, I wouldn't host anywhere where you do not at least have some measure of control over the environment. You can get a full VPS from numerous hosting services for $5 or less a month. Either continue hosting in Azure, or look into other respected cloud providers like DigitalOcean, AWS, etc.
I am working at silverlight application and my ask is about wcf and silverlight..
I crated silverlight app and wcf library in one solution..
Then linked service to app via Add service reference..
When I start only service, it's working without problem..
Problem just start when I want to run application.. I've got error about client access policy, which I have add as well..
So my ask is: Is there a way how to start app (and debug) and service together witout that error? and without duty to deploy? Only in debug mode?
The clientaccesspolicy.xml and/or crossdomain.xml files are not required inside your client application, and they do not belong in your web service directory. Rather, they must be copied into the root of your web server. Mostly, that would be the directory C:\inetpub\wwwroot instead of C:\inetpub\wwwroot\PDFService.
I have an ASP.net web service sitting on a server, and I have verified that it works properly via a small test client app in VS.
I went to add it in MonoDevelop to my MT application, (Trying both the ASP.net 2.0 and WCF declarations). Inside the "Add Web Reference" wizard, it finds the web service fine. But when I go to reference it, the app doesn't know it exists.
I went to look at it, and it seems when adding it, the namespace it's assigning to it is the title of my solution (which has spaces in it), but the namespace for each of my .cs files within my app contains no spaces.
Web Service Namespace (that it wont let me change): Ultimate GameDay 2011
MT Application Namespace: UltimateGameday2011.
So I manually went into the reference.cs file and took out the spaces. The app classes then saw my web reference object, but it still won't allow me to access any of its members.
Any help would be greatly appreciated.
Check out the following link http://merbla.blogspot.com/2011/03/monotouch-with-json-using-aspnet-mvc.html
Its not a fix to your problem rather a method of creating web services that MonoTouch more easily works with. In my experience ASMX and WCF services have been problematic when consuming in a Monotouch app.
If all else fails, try using the Silverlight service utility located in your programs folder
e.g. C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Tools\SlSvcUtil.exe
Can anyone provide a repeatable process for hosting a precompiled website or a web application in IIS6 that can be built using aspnet_compiler? I cannot get code to build reliably (works sometimes) with aspnet_compiler without hitting the "cannot load type: global" error. Changing to a website does not help as I can't even get the precompiled site to come up in IIS6. Whether it's a site or an app makes no difference to me so long as it works.
If anyone has some good info or can point me in the right direction, much appreciated!
It should work if you develop it as a web application, which will compile the service code into a single DLL. Dropping that DLL into the bin directory and copying the SVC file should work fine.
I know I've had this problem when I started working with Silverlight, but I can't for the life of me remember how to fix it.
I created a new RIA service application using the standard tutorial, added a table from the database and added a grid to display the results. Works great. Now I pull open the Web properties and change the web project to "use local IIS Web server". Suddenly the application will load up and give me the friendly "NotFound" error.
Please, someone remind me what I'm missing here.
I ran into this problem recently, and resolved it with help from this post on the silverlight.net forums.
Basically, I had Windows authentication and annonymous access enabled at the same time, and I need to disable windows authentication and restart IIS.
John
Not sure what the missing part is but I always start with Fiddler as will show the messages going across the wire. The actual messages can contains far more useful that the browser is hiding from the Silverlight plugin