I am having a C# based winforms or ASP.NET application deployed on my laptop which has to remotely connect to a windows service. The protocol mentioned in config file is TCP-IP as follows:
<wellknown url="tcp://LaptopMachineNAme:8085/MyService" type="MyController, MyOwn.AppTier" />
What would happen if the 'windows service' is also installed on my laptop?... Will the winforms or ASP.NET application be able to establish the "remote connection on the SAME machine"...???
There is no problem connecting to the service which is installed on the same computer. I would use named-pipes for this task, there is no problem having 2 (or more) bindings to the same service.
Doesn't even pass the FW IMO, when trying to connect to yourself...
I've done some projects that are using WinForms/ASP.NET combined with Windows Services on the same host - works perfectly fine
I've tested pretty many solutions having client and server working on the same machine. Should work. You can use localhost as machine name.
Related
I am trying to open the Word file from the C# application and converting it into PDF. It works for me locally. It works for me when I host on the testing server.
I have the same setup on the live server and it is not working in live.
In live server, I try the below scenarios,
Re-Installed the MS Office. --> Didn't work
Installed the visual studio and debugged there locally the code works fine the live server when debugging.
When it is hosted and then tested on the same server with the localhost in the live server it didn't work.
When tested from the remote server also it didn't work.
I have tried to change the port numbers. I have tried by changing the application pools identity to local server etc.it didn't work.
Changed the DM Config office registry to an everyone access. Nothing changed the same issue.
I am banging my head for the last 2 days, no improvement.
Thanks in advance for your help.
I have no prior experience working in the .NET stack. Not sure if this is a common requirement. I have developed a simple .NET web service which accesses the COM library provided by a label printer SDK to send print jobs to the printer connected to my machine.
I need to distribute the web service to clients so that it can be hosted on their machines locally. Set up should be minimum - something like an installer which will do the needful to deploy the web service locally.
I assume that any windows machine comes with .NET bundled.
I understand that IIS is the windows equivalent of apache-tomcat. Does is it come bundled with all windows machines? If it does, I figure I can write some scripts to deploy the web service to IIS using the ".deploy" file generated by Visual Studio.
Are there any betters way of doing this ?
So my question is :
How do I distribute a web service that should be be hosted and run locally on the client's machine without forcing the user to download and install a web server and deploy the package?
Edit:
So, I gather IIS is not supported by home editions.
What would be the best (or easiest) way to setup a development environment in order to:
- develop iOS(iphone) application using Xcode in a MAC
- iphone app will be calling .NET web services written in C# (windows laptop)
- the database is MS SQLServer 2008 R2 (windows laptop)
I understand that I could do all this in my MAC if I was using PHP/MySQL but I really need the C#/MS SQL combo.
Thanks in advance.
Ceta
If you don't have access to a dedicated Windows environment for development, I would suggest that you install VMWare Fusion or Parallels on your Mac, and do your Windows development in a VM.
Can you not just deploy the Webservices (on the web?) and just test your API calls remotely?
Alternatively, network the machines so you can access the development copy, or use something like Parallels Desktop to run Windows inside your Mac environment. Related: Visual Studio on a Mac
If you have both machines up and running, XCODE, VS and SQL Server already installed, then I don't see the problem.
You only need to configure the special things in your Windows Machine so its perfectly suited for Web Services development. Skip the steps you may already have done.
1) Install IIS 6 / 7 (depends on your windows version)
2) Install ASP.NET
3) Turn off your firewall for Home network, or configure some permission for allowing inbound traffic to the HTTP/HTTPS ports.
4) Make sure you have an static IP address in your home network, or, make sure your machine name is DNS resolvable from your Mac.
You need IIS because Visual Studio internal web server doesn't allow remote connections.
Now, how can you debug your C# code if the Web Service is running in IIS? two options:
1) (easy) In the solution explorer, right click on your web project, choose properties, chose Web, in the section named "Servers" choose use local IIS WebServer and name your virtual folder. You'll be able to debug easily.
2) (medium) You can just publish your web app to your local IIS, make it run, and then from visual studio using the debug -> attach to process menu attach yourself to the w3wp.exe. The problem is, if you have several application pools, have fun finding your application.
I am writing a WCF webservice. I need to access the service from another ( linux ) machine.
On my PC, I can access the url via 'localhost' just fine, however accessing it from another machine ( replacing localhost with the machine's name ) does not work.
I am relatively new to WCF and my guess is I need to configure it to allow requests from other machines, but I do not know how to do this.
Here is the output from netstat if it helps. Thanks!
C:\Users\bb\Desktop>netstat -na | findstr 57566
TCP 127.0.0.1:57566 0.0.0.0:0 LISTENING
How are you hosting your service? IIS or the built-in web server from Visual Studio? If it's the Visual Studio ("Cassini") web server, you cannot access it from other machines.
See this Stack Exchange question, which is similar: https://serverfault.com/questions/82899/can-i-access-cassini-from-a-remote-machine
Microsoft wants you to deploy your application to IIS for remote connections. Cassini (the Visual Studio web server) is purely for development purposes.
Are you running the service using Visual Studio? The ASP.NET Development Server, which Visual Studio uses by default, can only be accessed from localhost. Depending on what you are doing, you may be able to use IIS Express from within Visual Studio. Otherwise you will need to host your service in IIS.
I made a site using VS10 Ultimate [ASP.NET] and when I build & run it runs the severer locally, while I want to test it for security issues via Linux.
How can I run it globally ?
Thank you!
Your development machine probably has IIS installed. Copy the code or the compiled code to the web root of this installation. If you want to put it on another computer, then that will need to have IIS, relevant version of .Net installed.
It would also help if you can setup your local DNS to resolve the name for your computer within the LAN setup so that you can reache the machine using a name rather than the IP.
This will allow you to test the security issues that are client side. For Server side security issues, you will need to create a server in your LAN that is configured similar to the actual server where you would be hosting your site.
You need to set up the site in IIS Server installed in your Windows machine to run it locally
See the links to learn more:
http://www.beansoftware.com/ASP.NET-Tutorials/Set-Up-IIS-ASP.NET.aspx
http://support.microsoft.com/kb/323972
You need an ASP.NET hosting service.