Sunteți pe pagina 1din 10

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

Silverlight.NET Forums Powered by MSDN Home Product Info About Value Features Partners Resources Showcase Learn Samples Downloads Forums

US - English Select your language: English Sign In| Join NEW! Silverlight 5 is available Learn More

Home/Silverlight.NET Forums/General Silverlight/Hosting and Streaming/IIS 5.1 and WCF Service -> Step by Step Previous Thread|Next Thread

IIS 5.1 and WCF Service -> Step by Step RSS


8 replies
Last post Jan 06, 2011 06:51 AM by Arne0509

Arne0509
Member 5 Points 23 Posts Reply

1 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

IIS 5.1 and WCF Service -> Step by Step


Dec 21, 2010 02:05 PM|LINK Hello there, and again: I have no clue to make the next (last) step! I found some posts and some help via google, but in the end nothing that helped me to solve... I have a Silverlight Application with data from a Sql-Server via WCF-Service. Its working just the way we want it to work in vs2010. Now I want to put the app on our local intranet-server (IIS 5.1). Everything I found on google did not help me to come to an end. When I now call the webservice I get a Inner Exception - I now have had at least 3 different types of Exeptions. There was nothiong that really helpes. Changing endpoint, publishing via VS 2010, publishing the webservice first... Is there any step-by-step tutorial or something that could help me? Thank you!

AliDerbaj
Contributor 2042 Points 458 Posts Reply

Re: IIS 5.1 and WCF Service -> Step by Step


Dec 21, 2010 02:06 PM|LINK Hi, 1-Change the EndPoints in ServiceReferences.ClientConfig and any where there are Endpoints to <endpoint address="http://localhost/WebService/TestService.svc" 2-Right Click Project.Web and then select (Publish) : a-Publish method :FTP b-Target Location :any Folder(X)
2 of 10 05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

3-When you have Images and ect.. you should all put in ClientBin in your (X) Folder 4-Configure your IIS >> Add the MIME types Like this >>> http://www.longhorncorner.com/UploadFile/nipuntomar/ConfiguringIISSilverlight10022008234540PM /ConfiguringIISSilverlight.aspx 5-Add your Publish Folder to C:\Inetpub\wwwroot 6 >> 1. Open IIS 2. Expand Sites 3. Right click on Default Web Page and select "Add New Virtual Directory" option 4. In the opened pop-up window input "Alias" as Test and populate "Physical path" with C:\Inetpub \wwwroot\TestApp and click "OK" 5. Right click on the created virtual directory (Test) and select "Convert To Application" option from the content menu. 6. In the opened pop-up window make sure you have selected by clicking the "Select..." button Classic .NET AppPool in "Application pool". Click "OK".

7-Copy the clientAccessPolicy.xml and crossDomain.xml to your C:\Inetpub\wwwroot folder. a-clientAccessPolicy.xml: <?xml version="1.0" encoding="utf-8" ?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource include-subpaths="true" path="/"/> </grant-to> </policy> </cross-domain-access> </access-policy> b-crossDomain.xml : <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domainpolicy.dtd"> <cross-domain-policy> <allow-http-request-headers-from domain="*" headers="*"/> </cross-domain-policy>

8-In your Sql Server , Give IIS Users Permissions to Access your Database. Like this Link : http://codingresource.blogspot.com/2010/01/login-failed-for-user-nt-authorityiusr.html

3 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

Best Regards Ali Derbaj Remember: If this has answered your question, please click on "Mark as Answer" on this post Thanks and Best Regards. Ali Derbaj http://www.aliderbaj.de Germany

AliDerbaj
Contributor 2042 Points 458 Posts Reply

Re: Re: IIS 5.1 and WCF Service -> Step by Step
Dec 21, 2010 02:10 PM|LINK check this link too >> http://dotnetefectivecoding.blogspot.com/2009/08/publish-silverlight-3-on-iis-70-75.html

i hope to help you ... Remember: If this has answered your question, please click on "Mark as Answer" on this post Thanks and Best Regards. Ali Derbaj http://www.aliderbaj.de Germany

AliDerbaj
Contributor

4 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

2042 Points 458 Posts Reply

Re: Re: Re: IIS 5.1 and WCF Service -> Step by Step
Dec 21, 2010 02:12 PM|LINK http://www.longhorncorner.com/UploadFile/nipuntomar/ConfiguringIISSilverlight10022008234540PM /ConfiguringIISSilverlight.aspx Remember: If this has answered your question, please click on "Mark as Answer" on this post Thanks and Best Regards. Ali Derbaj http://www.aliderbaj.de Germany

Arne0509
Member 5 Points 23 Posts Reply

Re: IIS 5.1 and WCF Service -> Step by Step


Dec 21, 2010 02:40 PM|LINK Hello, thank you for your help. I am testing with a WCF-Service without a Database now. I tried to follow your instruction but in the end i got an error! Maybe I can ask you some specific questions: 1. Change the endpoints: what do you mean by anywhere? I changed this in ServiceReferences.ClientConfig where else? 2. "Convert to application" -> unfortunatley we have IIS5.1 and there is no option on right click. Thank you!

Whrend des Vorgangs ist eine Ausnahme aufgetreten, sodass das Ergebnis ungltig ist. Weitere

5 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

bei bei bei bei

System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() SilverlightApplication1.ServiceReference1.getTestCompletedEventArgs.get_Result() SilverlightApplication1.Home.client_getTestCompleted(Object sender, getTestCompletedEvent SilverlightApplication1.ServiceReference1.Service1Client.OngetTestCompleted(Object

Arne0509
Member 5 Points 23 Posts Reply

Re: IIS 5.1 and WCF Service -> Step by Step


Dec 22, 2010 08:24 AM|LINK OK- we are going to change our server (and our iis). We will see what is the next problem

AliDerbaj
Contributor 2042 Points 458 Posts Reply

Re: Re: IIS 5.1 and WCF Service -> Step by Step
Dec 23, 2010 08:30 AM|LINK Hi,

6 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

I mean when you declared endpoints in your C# code, you musst it change to the new Endpoint ... I have not very big Experience with IIS , i have IIS 7 ...

Ali Derbaj Remember: If this has answered your question, please click on "Mark as Answer" on this post Thanks and Best Regards. Ali Derbaj http://www.aliderbaj.de Germany

AliDerbaj
Contributor 2042 Points 458 Posts Reply

Re: Re: Re: IIS 5.1 and WCF Service -> Step by Step
Dec 23, 2010 08:33 AM|LINK did you read that : Preparing IIS Environment After you built your Silverlight application you're probably about to publish it on IIS. First of all, check the IIS in the Windows Features (e.g. on Windows Vista/7, navigate to Control Panel Programs and open Turn Windows Features On Or Off). Make sure you have checked the following options: Internet Information Services (recommend all features except FTP if you don't use it) Microsoft .NET Framework 3.5.1 (recommend all features) If you already have installed the IIS, you can start it (IIS Manager), it can be found in Control Panel Administrative Tools in Vista or Control Panel - System And Security - Administrative Tools in Windows 7 as Internet Information Services (IIS) Manager. Adding your Silverlight application In IIS Manager, right click on your Default Web Page, located under Sites, and Add New Virtual Directory.

7 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

In the opened window (Add Virtual Directory) input Alias name and browse for Physical path. You can also specify a user whos credentials will be used to open a web site by clicking on Connect as.... If you're happy with your settings click OK. You have successfully created the virtual directory where your applications resists. Now, you have to convert this virtual directory to application. To do this, just right click on it and select "Convert To Application" option from the content menu. The application pool should be "Classic .NET AppPool". To set it up click the "Select" button and choose "Classic .NET AppPool" from the drop-down. After then, click "OK" and your website is published on the IIS. Please follow this simplified example to setup web application in IIS for a project that's been build in C:\Inetpub\wwwroot\TestApp 1. Open IIS 2. Expand Sites 3. Right click on Default Web Page and select "Add New Virtual Directory" option 4. In the opened pop-up window input "Alias" as Test and populate "Physical path" with C:\Inetpub \wwwroot\TestApp and click "OK" 5. Right click on the created virtual directory (Test) and select "Convert To Application" option from the content menu. 6. In the opened pop-up window make sure you have selected by clicking the "Select..." button Classic .NET AppPool in "Application pool". Click "OK". That's all. Right now, you can check your website. Right click on the created application (Test) select "Manage Application" - "Browse" from the content menu. This will open your website on your default browser. Right now, your website is also accessible by typing the http://localhost/Test on the browser's URL. Remember: If this has answered your question, please click on "Mark as Answer" on this post Thanks and Best Regards. Ali Derbaj http://www.aliderbaj.de Germany

Arne0509
Member 5 Points 23 Posts Reply

Re: Re: Re: IIS 5.1 and WCF Service -> Step by Step
Jan 06, 2011 06:51 AM|LINK Hello again,

8 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

thanks for your help so far! We have a Windows Server 2003 and i can find the test application in our intranet with http://172.18.1.226/SilverlightApplication1TestPage.html! But when I call WCF-Webservice via Button I get an error! bei System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() bei SilverlightApplication1.ServiceReference1.testCompletedEventArgs.get_Result() bei SilverlightApplication1.About.client_testCompleted(Object sender, testCompletedEventArgs e) bei SilverlightApplication1.ServiceReference1.Service1Client.OntestCompleted(Object state) I changed the endpoint in the ServiceReference.ClientConfig like

<configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://172.18.1.226/Service1.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IS name="BasicHttpBinding_IService1" /> </client> </system.serviceModel> </configuration>

So is this the wrong location for the Service1.svc? In the xap file are no directories... Do I have to add a MimeType for the .svc (how?)? Thanks for your help again!

Previous Thread|Next Thread

Server not found


Firefox can't find the server at www.silverlight.net.

More...
Site
Privacy Statement Terms Of Use Site Feedback Advertise with Us

MSDN
Desktop Web Cloud

9 of 10

05-06-2012 22:18

IIS 5.1 and WCF Service -> Step by Step : The Official Microsoft Silve...

http://forums.silverlight.net/t/214007.aspx/1

Phone

Feedback
Feedback on Silverlight File Bugs Microsoft

Follow Us
Twitter Facebook

10 of 10

05-06-2012 22:18