tags:

views:

40

answers:

2
+1  Q: 

Silverlight port

When i run silverlight 4 application with the developer server, it seems to use a default port as localhost port 1091. How do i change to a different port?

A: 

In the properties window on the website, there is an option to assign it as dynamic or choose a fixed port called "Use dynamic port", set this to false and then choose your port number.

Or take a look here:

How to: Specify a Port for the ASP.NET Development Server

EquinoX
+4  A: 

You can set this in the web project settings.

Right click over the project to bring up the settings. Go to the Web tab and there under "Servers" is an option to either Auto-assign the port or set a specific port. Select "Specific port" and enter the value you want.

In VS2008:

Set Specific Port

In VS2010 the tabs have been reordered:

alt text

but all the actual settings are the same

ChrisF
I dont see the "Web" tab but i see the rest of the other tabs. Im using web developer express 2010.
@user464111 - In VS2010 Express its the 3rd tab down. All the other options are the same.
ChrisF
Still cant find it. The version i got is different. I dont have the whole vs2010 version. I just have the web developer express by itself.
@user464111 - the second screen shot is taken from the Web Developer Express version (it's all I have too!). It is the **web** project you need to set this on, not the **Silverlight** project.
ChrisF
sry im still new, but what do you mean by web project and silverlight project. I found this checkbox where i can check default web server or specific server. But that ask me for a specific base URL
@user464111 - when you create a Silverlight project you need to create a web project to host the Silverlight application. Visual Studio will create this for you and put it in the same solution as the Silverlight project. You set the web project as your start up project so you can debug your application. Can you add a screen shot of what you are seeing to your question?
ChrisF
Oh i guess i never created a web project to host my silverlight application. Whn i created my silverlight application i didnt select "Host silverlight in a new web site" If that is why, can i change it now??
@user464111 - the simplest solution might be to create a new project and copy the Silverlight code into the new solution.
ChrisF
OK ill do that. Thanks alot!