How work with a visual studio project in two different machines - visual-studio

In my home pc, I'm inside a LAN so my projects are access using localhost. In the WEB section of the project I use Local IIS
http://localhost/ProjectName
But in my office the pc belong to a domain so my IIS is bound to
http://myPc.myDomain.com/ProjectName
So how I can open the same Visual Studio solution on both PC?

First, on the home PC make an entry such as this in the local hosts file:
127.0.0.1 myPc.myDomain.com
Second, also at the home PC, configure the Website bindings in IIS, so when IIS receives a request for myPc.myDomain.com, it knows which website should process the request.

Related

How to Publish an Umbraco Intranet?

I have just completed an Umbraco intranet using WebMatrix. Now I want to publish it to our server so that everybody can see and use it. WebMatrix can only do Web Deploy or FTP, so I opened the project in Visual Studio 2013 to publish it there. I was able to publish it to my desktop, where I have attempted to get it running here before uploading to the server. So in IIS I 'Add a Website' and set up the project, using port 101. I tried it both on my desktop and then moved it to wwwroot and in both cases IE says 'This page can't be displayed'. I am using the CE database with Umbraco 7.2.4.
Help please. I've been at this for days now.... I've tried the umbraco forum and google and got nowhere. :(
Tony
If you have remote desktop access to your web server, you don't actually need to rely on web publishing. You can just build the website in release mode, and then copy all the folders from the web project onto the webserver.
On the web server you can manually set up an IIS website and set up host names etc. You shouldn't need to deploy it using visual studio, this way is much safer
In IIS, you should set up a new website, using port 80 on your HTTP binding.
From the sounds of the error, IIS is not looking at the right physical path.
You should use the Microsoft guide on How to set up your first IIS Web Site as a starting point.

Visual Studio 2010 Remote Debug across domains

I'm trying to set up remote debugging across domains. My Windows 7 workstation running Visual Studio 2010 is on one domain and I'm trying to debug an ASP.NET app running in IIS 7 on a Widows 2003 server box in another domain. I have found many instructions on how to set this up, this being the best, most clearly written one: http://blogs.interknowlogy.com/2011/11/16/remote-debugging-from-visual-studio-2010/
However, I can only seem to connect to the remote debugging monitor on the server if Visual Studio is being run as the local user on my workstation, not as the domain user. This creates a number of challenges, such as loss of source control connectivity. When I try to connect using the domain user I get the following error: "Unable to connect to the Microsoft Visaul Studio Remote Debugging Monitor named 'username#servername'. The specified account does not exist." (I have substituted a generic username#servername for the actual values)
I have found a number of sources suggesting this will work with the domain user running VS2010 but have had no luck. Any idea what I might be missing?
Solved
First, i've read #KyleMit's answer on the same question and done all steps.
But, for across domain debugging also need to edit C:\Windows\System32\drivers\etc\hosts file on local computer.
Just add remote computer's ip address like this:
172.172.172.172 SRV-TEST-ADRESS
Where:
172.172.172.172 - ip address of your remote server
SRV-TEST-ADRESS - Server's name from Visual Studio Remote Debugger
Monitor on remote computer
You can know your server's ip address by ipconfig in cmd
After that, i could attach to proccess on remote computer across domain.

How do I run (debug) WCF REST Service application on local IIS7 server

As the question says, I have a problem running the web app on local IIS.
Here is my situation:
WIndows over Oracle VM VirtualBox running on Linux Ubuntu.
Bridged Adapter so that Windows box gets local IP from my router.
Visual Studio 2010 + sp
WCF REST Service application plugin for project template
The application runs when using visual studio development server (on localhost).
Target framework is v4.0
What I need is that the application runs on IP instead on localhost (so I can consume it on remote computer in LAN), so I configured IIS7.
Here is IIS configuration:
I created a website with target framework v.4.0
I binded the site to my local IP on port 80
Path to the site is /inetpub/wwwroot iisstart.htm as default document
IIS runs ok. If I open "http://my_local_ip" I get the welcome logo.
The problem is in visual studio.
When I go to project properties "Web" section and select local IIS over vsd server is where I get lost. If I set "Project URL" to "http://my_local_ip/some_name" visual studio complains that it cannot find IIS server and so it was unable to create the virtual directory. I tried manually adding virtual directory in IIS manager, but no effect. If I use "http://localhost/some_name" as the "Project URL" the virtual directory gets created, but it makes no sense does it?
Could some one please enlighten me?
If I use "http://localhost/some_name" as the "Project URL" the virtual directory gets created, but it makes no sense does it?
I think you are mixing two different things here. When you ask VS to use localhost as the IIS Server for your project, it will connect to the local IIS to perform configuration tasks. If you ask VS to use "my_local_ip" you are telling VS that you IIS Server is remote, and therefore VS will use remote administration to configure IIS (VS can't know that my_local_ip is the local computer).
But remote IIS admin isn't enabled on a default WinServer box. Furthermore, it would require some additionnal network config. You should therefore tell vs to use the local server.
In fact, IIS site bindings and VS deployment parameters are too completely different things. So, deploy your site on http://localhost/your_site.
However, I don't really like the prospect of using VS debugging deploy to deploy a real app. The directory will contain all your project files... You should:
create your site on IIS manager and setup a virtual directory.
Either
ask VS to publish the site to a directory (your virtual directory)
ask VS to publish a WebDeploy package, then ask IIS manager to import the package.

How to make the webserver within Visual Studio serve content that’s viewable by other machines on the network?

How do I make the webserver within Visual Studio serve content that’s viewable by other machines on the network?
For example: When I press F5 and I give the other person the ip + port he/she can see the content.
Thanks!
You can setup Visual studio in order to use IIS to debug. Its in the properties.
If you do that then people can visit your debug.
http://learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-7/
Sounds like it's not possible.
From MS Site:
If you cannot or do not want to use IIS as your Web server, you can still test your ASP.NET pages by using the ASP.NET Development Server. The ASP.NET Development Server, which is included with Visual Web Developer, is a Web server that runs locally on Windows operating systems, including Windows XP Home Edition. It is specifically built to serve, or run, ASP.NET Web pages under the local host scenario (browsing from the same computer as the Web server). In other words, the ASP.NET Development Server will serve pages to browser requests on the local computer. It will not serve pages to another computer. Additionally, it will not serve files that are outside of the application scope. The ASP.NET Development Server provides an efficient way to test pages locally before you publish the pages to a production server running IIS.
You could installl IIS or IIS express and publish to them, otherwise as Franky says its not possible with Cassini (the VS inbuilt one)

Debugging ASP.NET MVC project in VS2010 and accessing on networked computers

I'm wondering if it's possible to allow users on my local network to connect to an ASP.NET MVC 3 app I'm running through VS2010 on my local PC. The purpose is to let others test during some rapid application development without deploying to a server.
By default, the port seems to be blocked. Is there a setting in VS2010 or IIS Express that I can change to allow access to it?
By default VS sets localhost bindings in applicationhost.config file (%userprofile%\documents\iisexpress\config\applicationhost.config), so you cannot access it from other machines.
To access your site from other machines,
you need to update your site bindings (in applicationhost.config file) and add a site binding with your machinename
Run VS as administrator
If firewall is blocking your port, unblock it
Following link may help you
Configure IIS Express for external access to VS2010 project

Resources