How can I get Visual Studio Web Development Server (Cassini) to send the domain name of the request to the web application? - visual-studio

We're developing an application that is sensitive to the domain name of the request. The problem we're running into is that we have to use IIS in order to test the application because Cassini will only send "localhost" as the requested domain despite using a different domain in the address bar. While IIS does give us better performance than Cassini, we would still like to be able to hit F5 to run our application from within Visual Studio.
Is there any configuration that can be done to specify the domain name to use in Cassini?

I just released the CassiniDev 3.5.1/4.0.1 beta with a simple test fixture example if you are interested.
It supports arbitrary IP addresses and host names. Should fit your needs quite nicely.
http://cassinidev.codeplex.com

Related

Is omnisharp Server similar to IIS express

Is omnisharp server similar to IIS express? Let's say I have a project folder which has only html files, I start the ominisharp server through atom text editor. It gets started and says listening at port xxxx
If I browse localhost://xxxx/index.html will it serve that file?
I am newbie please clarify
No, the point of the Omnisharp server is not to be a general purpose web server - it's to act as a service. Think of it as an "IDE service" that just happens to exposed itself over HTTP, as that's the easiest way for many clients to talk to a service.
Unless you need to integrate something with Omnisharp yourself (i.e. writing code to be a client), you can probably just think of it as a plugin for whatever you're using. (In most cases there will be an actual plugin, which then talks to Omnisharp.)

Disable the published MVC3 solution to be published again

Hi,
My application is in Asp.Net MVC3 coded in C#.Net. I have published my solution and deployed it on IIS on the client machine. For this particular client we are not using any online server, we have published on client's local machine on IIS and from that machine only they will use it. The only problem we are having is regarding the security of the application as our client is accessible to the database as well as the application.
So under this scenario any technically aware person can take the published copy of the application and publish it again on their machine.
My query
How can i prevent the user from redeploying it on any other machine. Something like we have in the desktop application where the IP of the machine is taken and that particular application can run only on that machine.
I want my published content to be used only on the machine im have published and if the user wishes to copy the published content and deploy on other machine then it should not happen.
I have googled a lot regarding this but no result is returned in this regard.
Suggest how can i achieve the same.
Yes you can secure your ASP.NET MVC application to run on only 1 computer. Here are some companies that offer copy protection:
DeployLX by Xheo (http://xheo.com/)
Cryptolicensing by LogicNP Software (http://www.ssware.com/cryptolicensing/cryptolicensing_net.htm)
IntelliLock by Eziriz (http://www.eziriz.com/intellilock.htm)
ElecKey 2.0 R8 by Sciensoft (http://www.sciensoft.com/products/eleckey)

Building and starting a web role in Visual Studio with a specific URL

I have an Azure service containing a web role. Both configured to run on IIS Server locally. I would like to build/deploy and start the web role in a specific URL in Visual Studio. It always ends up in addresses using 127.0.0.1 even I specify what project URL is in the project configuration. Is there any way to change this something like dev.xxx.com?
You're running through the local emulator I assume. As such, the URL project settings won't apply. Just like if you deploy it to the cloud, you'll need some type of DNS forwarder or alias.

How can I change the URL of my IIS published web application

This is my first time publishing my visual studio project. I am using IIS manager to publish it. My server name is KIMSERVER and the port I have now is 97. Thus when I need to launch the web app I saved I need to type KIMSERVER:97/
Is there any way that I can change the URL to KIMSERVER/WebApp1 or any URL I want?
Thank you.
Create a new Virtual Directory in your Sites App Pool (Name it WebApp1 and it should be possible to connect via KIMSERVER/WebApp1).
After you published to it, its converted to an application.

"You have created a service." How did this happen?

When I create a new "WCF Service Application" in Visual Studio and right-click Service1.svc, I can choose "View in Browser". A web browser appears showing http://localhost:50311/Service1.svc, which says
Service1 Service
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http://localhost:50311/Service1.svc?wsdl
...
The service somehow seems tied to Visual Studio itself, since the web page becomes inaccessible if I close the solution. What's going on? I don't have a web server installed, and I didn't (knowingly) start the service. What is the source of the displayed web page, and why is it on port 50311? Can the page be customized?
What you're seeing is the development web server that starts when you run a debugger instance of a project that requires a web server. (WCF, ASP.NET).
The port 50311 is determined by your project settings (most likely random, but you can specify).
The page for a .svc file is not meant to be customized. Since the service is waiting for a caller, that default page simply tells you that it's running properly.
Keep in mind that WCF offers several binding options that use various protocols (HTTP, TCP). Depending on the protocol that you choose, you will have to host in either IIS, a Windows Service or elsewhere. By default, new services will adopt a binding that works in IIS.
Check out Introduction to Building Windows Communication Foundation Services

Resources