WCF service solution not working in my System - wcf

I have a WCF Service solution hosted in server .I am downloading the solution to local and running the service ,it shows 404 not found when browsing it as http://localhost/help,when browsing as http://localhost/Product.svc?wsdl it is showing the wsdl document properly .the solution works fine if it is downloaded in other Computer .
I think the problem is due to IIS configuration in my system.
Any suggestions will be of great help.

You'll have to add the /help segment to the end of your service url (behind the SVC file): http://localhost/Product.svc/help

Related

Deployment error: "The requested page cannot be accessed because the related configuration data for the page is invalid"

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.

Silverlight and WCF error

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.

WCF service not reachable (selfhosted)

today i decided to have a look at WCF and the example worked so nicely on my localhost that i tried to run in on my server too, so i compiled it with the correct host(tested both,ip and domain) and uploaded it to my server
you can see the sourcecode here:
http://pastebin.com/YiCR0RCf
the problem is,that i can't add the service to my client application, nor can i open the http site in my browser (localhost it worked just fine)
i'm running this on a windows root server and disabled the firewall for this program.
Would be great if you could give me a hint in getting this to work correctly, as i spent the last 2 hours with randomly changing code and uploading the program hoping that it would work now.
Thanks
Ok it was the windows firewall, i completely disabled it(added an exception before,but that didn't help as i know now) and it works.
thanks anyways

Issue Hosting Silverlight Application on IIS 7.5

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!!!

RIA: "Use local IIS Web server"

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