locked
Silverlight 4 application not working in windows phone 7 RRS feed

  • Question

  • Hi Pals,

        I would like to clarify that i am not able to execute my silverlight 4 application in Windows 7. Actually i have installed windows 7 in my system and also installed VS 2010,silverlight4. then when i am trying to execute my sample application in SL4, the code behind file is not executing but not getting any exception. only loading xaml page and not able not set break point. what will be the problem. I have installed windows phone 7 also. will it be problem? but windows phone 7 appln is working fine. I will be happy if anybody clarifies me.

    Thanks

    Shan



    Sunday, December 19, 2010 2:27 AM

Answers

  • Hi Shan.

    Please make sure that your policy file can be retrieved at the required location. E.g. use a browser and open the address:

    http://localhost/clientaccesspolicy.xml (or use your computer name instead of localhost)

    If the policy file does not show up, it's not placed correctly (make sure you're really using the web server root). If it shows up, the policy definitions might actually be incorrect and prevent SL from connecting. Can you then post the contents here?

    Monday, December 20, 2010 1:57 AM
  • Hi Peter,

        Thanks peter, as per your comments, i checked my clientaccespolicy.xml in browser. it was not working. then i go to IIS's default web site root in windows 7. the crossdomainpolicy.xml is not available. Actually what was the problem is that I have installed two OSs (XP and Windows 7) in my system. so i have wrongly put my crossdomainpolicy.xml in the default website root of XP instead of Windows 7 default website root. after put it windows 7 IIS default website root folder, now it is working fine.

    Thanks

    Shan


    Wednesday, December 22, 2010 12:37 AM

All replies

  • Hi Shan. Installing the Windows Phone 7 tools does not interfere with the possibility to develop and/or execute Silverlight 4 applications. It's most likely some other error.

    If you're not able to set breakpoints, the reason often is that Visual Studio is not able to attach to the correct browser process. For Firefox you can use my debug helper plug-in (see my blog), but this also often happens in Chrome (you have to try multiple times or manually attach to the correct process there). So the first thing is to try different browsers and/or make sure that VS actually is attached to the correct process.

    What you also can do is check the error console of your browser to see if any errors are logged there. Unhandled exceptions may not lead to an explicit error message (like a notification windows or similar), but are logged in the error console.

    Sunday, December 19, 2010 11:15 AM
  • Hi Peter,

        Thanks alot for your valuable reply. yes i tried in firefox. so that is the problem. when i am trying in ie. it is working fine with setting break point. but now i am getting another issue.

        Actually i have developed silverlight 4 appln and WCF service both are in my local system. i have hosted my wcf service in IIS. when i am trying to run my SL appln, I am getting crossdomain policy issue. not able to reach wcf service method. but i have put crossdomainpolicy.xml and clientaccesspolicy.xml in my wcf service root folder and our www root also. still i am getting crossdomainpolicy issue.

      can you please to solve the problem.?

    Thanks

    Shan

     

     

     

     

    Monday, December 20, 2010 12:27 AM
  • Hi Shan.

    Please make sure that your policy file can be retrieved at the required location. E.g. use a browser and open the address:

    http://localhost/clientaccesspolicy.xml (or use your computer name instead of localhost)

    If the policy file does not show up, it's not placed correctly (make sure you're really using the web server root). If it shows up, the policy definitions might actually be incorrect and prevent SL from connecting. Can you then post the contents here?

    Monday, December 20, 2010 1:57 AM
  • Hi Peter,

        Thanks peter, as per your comments, i checked my clientaccespolicy.xml in browser. it was not working. then i go to IIS's default web site root in windows 7. the crossdomainpolicy.xml is not available. Actually what was the problem is that I have installed two OSs (XP and Windows 7) in my system. so i have wrongly put my crossdomainpolicy.xml in the default website root of XP instead of Windows 7 default website root. after put it windows 7 IIS default website root folder, now it is working fine.

    Thanks

    Shan


    Wednesday, December 22, 2010 12:37 AM
  • Good for you, and thanks for letting us know (I'm sure some day someone else will be in the same situation and then hopefully stumble upon this thread)!

    Wednesday, December 22, 2010 1:00 AM