Unable to Create the Web site 'http://localhost/WindowsService'. The Web server 'http://localhost' could not be found - vb.net

I am working on a Windows Service and whenever I try to publish it, the error is thrown. I have already installed the service through installutil. I would like to test the module I've added before I commit.

It appears IIS was turned off in Windows features so I just turned it on (opted in IIS).

Related

Can MDS only be installed on a server

Can you run the SQL Server 2014 Master Data Services Configuration manager on windows 8.1 pro and not on a server like Windows server R2?
If so please help it tells me "The required .svc handler mappings are not installed in IIS." but I have checked and everything in the windows features under IIS is selected
The answer was a simple google search away.
You can run it on Windows 8.1 Pro.
Take a look at this link for several troubleshooting help:
SVC_Handler_mapping_error_in_MDS_Configuration_Manager
SVC Handler mapping error in MDS Configuration Manager
When you configure Master Data Services in the MDS Configuration
Manager, you may encounter an error indicating that the required .svc
handler mappings are not installed in IIS.
Before creating an MDS web application, you must correct the following
errors:
Internet Information Services (IIS) is not configured on this server.
The required .svc handler mappings are not installed in IIS.
This can occur in one of the following instances: IIS may be missing the necessary .svc Handler Mappings. Visit IIS Manager from
the start menu. If you have a default website listed, click the site,
and click Handler Mappers icon. In the list, sort by Path column.
notice if *.svc is listed or not. If it is already listed, this error
may a false positive, but if it is not, you may need to install the
*.svc path mappers in Step 2 & 3 below.
Depending on the IIS version, there are different ways to get the
Service Mappers installed. For .Net 4.0, the mappers may need to be
installed by installing HTTP activation in .Net Framework 4.6 Advanced
Services. From the start menu search or control panel, find the item
Turn Windows Features Off or On. then in the tree of Windows Features
find .Net Framework 4.6 > WCF Services > HTTP Activation
On earlier Windows versions where .Net Framework 4.0 does not come
preinstalled, when you add or install IIS features after .NET 4 was
installed, you may encounter this error. To fix this issue, open a
command prompt and go to the .NET directory (for example
%windir%\Microsoft.NET\Framework64\v4.0.30319). Run the command:
aspnet_regiis -i.
You may encounter this error as a false positive or false negative
when there is an existing IIS website(s) already existing in your IIS
server, but you select a different Web site to host MDS, or when you
select a Web site other than the first Web site listed. This can
happen in following two ways: Service handlers are not installed on
the first Web site that MDS is not attached to, but are installed on
another Web site that MDS is attached to. MDS will post an error
because it looks at the first Web site, not the second Web site. This
is a false negative, in that the error message indicates that the
handler mappings are not made, whereas they actually are. In this
case, you can ignore the error and proceed. Service handlers are
installed on the first Web site that MDS is not attached to, but are
not installed on another Web site that MDS is attached to. MDS will
not post an error because it looks at the first Web site, not the
second Web site. This is a false positive, because the lack of handler
mappings will cause MDS not to work. You should install the handler
mappings for the Web site that you are attaching MDS to.

how can I test a WCF service using XAMPP to work with Apache server?

I built a WCF service on a windows virtual machine, and tested it with the WCF test client by typing this on my browser:
http://localhost/Service1.svc/getAllCustomers
... and it works pretty good. Now the problem is that I want to do the same test in my real computer (not the VM).
I'm using XAMPP on the VM, I have set the project on the htdocs folder, and I type this on my browser:
http://10.211.55.3/WCFWebService/Service1.svc.cs/getAllCustomers
The problem is that it doesn't return the result of calling getAllCustomers, instead it returns the Service1.svc.cs in plain text.
I want it to do the same thing it does on the VM - can someone tell me what the problem is? I think it's because on the VM it works with the WCF test client, and since my computer is a Mac I can't run the WCF test client.
A WCF service can't run on an Apache web server instead you should install IIS Server on the VM in order to test the service.
Refer to this: http://msdn.microsoft.com/en-us/library/ms733766.aspx
I found this with a Google query.
I kept the tab open, but continued exploring the other search results.
One I found particularly interesting was this one: WCF acting as Web Service without IIS
It appears WCF gives options other than IIS to host the web service (Console Application, Windows Application, Windows Services).
The Windows Service link is provided here: How to: Host a WCF Service in a Managed Windows Service
I have not done this, so I cannot elaborate on what problems you will run into.
I just want others that may run into this (like I did) to know that the one answer posted last year may not actually be the end of the road.

Error while deploying a WCF service on web

I created a working WCF Service Library on my computer.
When I published it on the hosting (right-click -> Publish -> I entered address) and launched the web page with this service like ".../webservice.svc"
I received such an error:
What was wrong?
What should I change to make it work?
It is essential to turn on the error message to see what is the error itself.
After I turned on the error messages in the WCF service configuration file, I saw the problem and fixed it. It was a problem with one of the libraries.

WFC SVC File emits HTML when called from a service client

I'm in the process of deploying a WCF service application. The service works fine if it's running as its own site, but the intention is for the service to run as a virtual directory of the Default web site of the server. When I set the service up in this configuration, I get an odd problem. When the client tries to make a service call, it receives the HTML of the friendly service description, not SOAP. Naturally this generates a service error. The HTML appears to be identical to the service page that you see in a browser with an HTTP Get, but I'm only seeing the first 1024 bytes in the error message, so I may be missing something.
I've checked HttpHandlers and loaded assemblies, and as far as I can tell there's nothing unusual that is being inherited by the virtual directory. The default site has 3 ISAPI Filters installed including Outlook Web Access (yes, this server is running Exchange). I tried installing these filters in my test web site, but it still ran the service without problems. The problem only happens with the service is running as a virtual directory of another virtual directory within the default web site.
The server is Windows Small Bus Server 2003 SP 2 running IIS6.
If you're hosting WCF in IIS you need to set the server up in the 'Application Role' check out the following link does that help:
MSDN: Internet Information Service Hosting Instructions

No intropage in a Managed Windows Service

I have to do some maintenance on a WCF service that is hosted in a managed windows service.
In the old deployed version I can enter: http://localhost:9091. It shows a page with info about the hosted WCF service (with a C# and VB example).
When I get the sources from TFS and reinstall with the MSI, the same http://localhost:9091 gives a 404.
What could be wrong ?
Could be lots of things. Try these for a start:
Installed msi on wrong port
web site / app pool not runnig
the configuration in web.config does not match the new location
Web site not marked as asp.net 2.0
IIS not configured to recognise svc files
The last 3 are the most probable. Check the event log for more details.
Here are a few more based on the comment:
is the service started
is the port blocked on the new machine
the configuration in web.config does not match the new location
Perhaps that port is meant to be the port of the ASP.NET Development Server. Is the service started? Open the solution in Visual Studio, right-click the service and choose "View in browser". That will have the side-effect of starting the service.