I have created a site in Azure and downloaded the publish settings file. When I click publish in VS I get the option to select a file with publish settings but only for the ASP.NET project. More or less like so.
The problem is that I'm trying to publish a WCF library and the publish option allows only for IIS, FTP or system. I can't find an option for publishing via the settings file I've downloaded.
How can I point my WCF project to the PUBXML file?
Edit
Based on the comments and replies, I also installed ASDK. Those are the projects I can choose now.
This is what you are looking for. This screenshot is from Visual Studio Community 2013.
and then...
.. then app.config additions for your addresses, bindings, and contracts
.. then Azure Endpoint configuration
Your best bet would be to publish your library within a Worker Role and open an http endpoint through configuration.
you can also configure ASP.NET to host your WCF endpoint. Again, just a bit of configuration needed for that.
Related
I have my Azure cloud solution, with a WCFWebRole, and i created 2 services (.svc).
On localhost they both work great.
But when i publish my solution to Azure, only one of the .svc's are uploaded
What am i missing?
I read a lot of threads about people combining all their service interfaces into one .svc file for some reason, but i see no point in that, if worst comes i will divide the .svc files into 2 WebRoles (which will be a waste, and probably not possible when thinking about it, because i have Windsor Castle and Nhibernate configured on the WebRole, so Lifestyles won't be kept between the webroles)
It doesn't seem like a big dig having more than one .svc when working on localhost...
Thanks
Yes, you can have more than one .svc WCF service in a single WCF project assigned to a single Azure Cloud Services Web Role.
This GitHub project is a sample of such a project that, after configured with storage credentials in ServiceConfiguration.Cloud.cscfg and when deployed to a Windows Azure Cloud Service, will answer to requests to both Service1.svc?wsdl and Service2.svc?wsdl.
To verify if your .svc files are being uploaded in the package, you can go to the bin\Release\app.publish directory under your cloud project and extract the .cspkg file (it is in ZIP format). Inside it you'll find a large .cssx file. Extract it as well. Inside this file look into the approot directory. You'll find the project files there. The same files should be found in the csx\Release\roles under your cloud project.
If the .svc files are indeed being uploaded and they're not executing in the cloud environment, check your WCF bindings and endpoints.
You may also activate Remote Desktop in a single development cloud instance and connect to the server to verify logs and events, and to inspect the application directories.
I have a WCF service that we created. Are there any steps that you need to do to convert it to be able to run on AppFabric? In the past when I have created services for AppFabric I have used the AppFabric Item type in Visual Studio.
Short answer, no. You need to install App Fabric on IIS, and you can configure anything there. Nothing special needs to be done on the C#/WCF side. However, you are able to adjust the config file of your project to alter the App Fabric settings, just as you would for IIS.
I have a silverlight business application which access to a web service. I've created WCF service (in RIA part) which access this web service, and then added Web service reference in SL project. Using this way (proxy), I got service address like this: localhost:7777/... When I deployed application to IIS, this port number was not the same (expected, but...).
Since I couldn't configure this port number, I made separate service (not in the same solution) and deployed to IIS. After that, I added service reference to SL project. Similar like before, but now service is not in the same solution, but independently deployed on IIS. This approach doesn't work. In Fiddler all I could see is HTTP 500.
Could someone please tell me how to deploy SL Business Application which has an access to a WCF service which is deployed separately?
Best,
Joksimovic
What you'll want to do is create separate versions of your ServiceReferences.ClientConfig file (which resides in your Silverlight application and contains the service endpoints for the application).
We create a separate ServiceReferences.ClientConfig for each possible deployment location and then base them on the Silverlight project's build configuration. So, when the project is built and it's build configuration is set to "Debug", we have a ServiceReferences.Debug.ClientConfig whose contents are copied into the project's local ServiceReferences.ClientConfig. Ditto for our Test, UAT, and Release builds.
Here is a link which talks about choosing the correct config based on your build configuration: How to use Visual Studio 2010 config transform when running/debugging locally?
I've got a WCF service using the netTcpBinding, and no other binding. It works great when I manually deploy the files to IIS, and my client application can consume the service when I enter the net.tcp://localhost(etc) url. Now I'm trying to get the project to run in Visual Studio, so I can have the service and client in the same solution, and reference the service directly instead of going through IIS, and having to redeploy files manually.
Neither IIS Express nor the Visual Studio Development Server can use net.tcp, so they're out. In the Web tab of my service project, the "Use Local IIS Web Server" or "Use Custom Web Server" looked like good options, but neither of them will accept a URL that doesn't begin with http.
Is there some way of making my WCF service use IIS, and having my client reference the service directly (so that I don't have to deploy files to IIS, and then update service reference, every time I compile)?
Start the service in WcfSvcHost, then try to add a reference to the hosted URL.
Unfortunately, the VS IDE has no technique to start services automatically, except for when you're debugging.
Also, you always need to update service references explicitly. You need to decide which of your changes are ready to be applied to which clients of your service. It would be bad to assume that all clients should be updated as soon as you make a change then compile your service.
You could add a project, which you don't deploy, but only use during development, that self-hosts the service.
I'm new to creating Windows Services to host WCF, as I've been using IIS to do this. I've created a Windows Service to host about a dozen of WCF services, and have set up an app.config file in Visual Studio to handle all the endpoints and addresses for each of the services.
Where on the file system are windows services installed? Is there a way to reconfigure the config file to change bindings/addresses without having to uninstall/reinstall the service?
I've been doing this with the published web.config file that is present in the inetpub for WCF services that are using IIS, I'm wondering if it's the same with a windows service.
The answer to your title question is YES. The app.config to Windows Services is the same as the web.config is to IIS hosted web services.
Windows services are usually deployed as regular executable files in a certain place within a product specific path. The app.config placed next to this executable is with the same name as the executable appended with .config. So a ScanService.exe has a ScanService.exe.config next to it that contains its configuration.
Hans , I have developed/installed my distributed services(.NET remoting) with as windows services, What happens is you need to specify folder while installing the service. eg you select the folder as "C:\Program Files\MyService" then your MyService.exe.config will be installed in same folder as "C:\Program Files\MyService"
so your can find "C:\Program Files\MyService.exe.config" and modify your bindings and then restart your windows service.
Other points you consider is
There will be no AppPool here so what ever account you will use while installing the services will be used to run your services. you may need to provide some additional permissions if you are using simple domain\account
in case you need to access event log or registry via your service.
Or in you can modify your service account later on after installing the services.
Is there any particular reason you want to move away from IIS ? As my WCF services also live in IIS so was wondering if you facing any issues with one.