locked
Silverlight Page taking too long to load RRS feed

  • Question

  • Hello all,

    When I am debugging my silverlight application, it is taking forever to load the page. Surpisingly the build is successful and no errors/warnings have been displayed. Please let me know what could be the possible problems for this?

    I know I haven't provided you any information about the application in specific. Please let me know if you need any information from my end to help me solve this issue.

    Thanks

    Vinay

    Friday, March 2, 2012 5:28 PM

Answers

  • Hi VinayBhargav,
    Thanks for your question. I have checked the link you provided and found out that there was only a sln file. I can't reproduce your issue only through this file.

    A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
    A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll

    Based on your code, it's hard to say what is the main issue. Thus, I would recommend you catching the exception.  You can open Visual Studio and click Debug menu->Exceptions at first. Then check "Common Language Runtime Exceptions". In this way,  the debugger whill stop when an exception is thrown. This will help you to find the issue and resolve it. If the issue hasn't been resolved, please try to provide more information. 

    Best wishes,

    Friday, March 9, 2012 2:42 AM
  • Hi,

    --Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_d4e6b3a9196672.tmp' is denied.


    According to the description above, this issue will occur when you're trying to run with non-admin privileges. Thus you need to configure the ASP.NET to run under your account and reset the permission. Please try to go to the direction of the .net4.0 at first.
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\
    Then run the command below:
    aspnet_regiis -ir
    Please see the similar thread below:
    http://forums.asp.net/t/1165113.aspx/1

    SecurityException Occured

    --Requested registry access is not allowed.

    This error will occur when ASP.NET application tries to write new EventSource in the EventLog.  In order to resolve  this problem, a user who has administrative rights must create the event source before you run the ASP.NET Web Application. Please check the link below for details:

    http://support.microsoft.com/kb/329291

    Best wishes,

    Monday, March 12, 2012 3:10 AM

All replies

  • Hi Vinay,

    If Build is Successful then there is another problem. you have to read your code carefully. 

    because without error or sample code help is not possible.

    if you generate sample application the upload in sky drive and paste your link here.

    Regards

    Maya

    Saturday, March 3, 2012 4:01 AM
  • Hey Vinay,

    We cant tell before checking your code, but i will tell you the general scernarios, which might help you.

    1. Dont add images or other files as Resources in the XAP, which will increase the XAP size.
    2. There might be issue with your webservice, if you are using it.
    3. Database might be slow.
    4. Web servcer might be slow.
    5. If you want to increase the load time , use assembly caching.
    6. keep images in Client Bin folder.
    7. Dont call no. of services in App.file startup event.
    Let me know if any thing else needed.
    Saturday, March 3, 2012 5:38 AM
  • Hey Maya,

    Please find the link to file in skydrive. I uploaded .sln file. I hope it can help you in figuring out the problem. The screen status is showing 100% loaded but i am not able to see any output.

    https://skydrive.live.com/#cid=A859D62D421AE312&id=A859D62D421AE312!105

    https://skydrive.live.com/?cid=A859D62D421AE312&id=A859D62D421AE312!105

    Let me know if you need any more information from my end.

    Thanks

    Vinay

    Tuesday, March 6, 2012 4:22 PM
  • Hello Syed,

    Please find the link to .sln file in skydrive...let me know if you need any more information.

    https://skydrive.live.com/#cid=A859D62D421AE312&id=A859D62D421AE312!105

    Thanks for helping me..

    --

    Vinay

    Tuesday, March 6, 2012 4:24 PM
  • Hello Syed,

    From the outputlog i figured out that I am facing following exceptions.

    A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
    A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll

    I am opening a connection to sql server database using wcf data service. The code to open the connection is as specified below.

    [ServiceContract(Namespace = "")]
        [SilverlightFaultBehavior]
        [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
        public class CoalDataService
        {

            [OperationContract]
            public double returnADOData()
            {
                // Add your operation implementation here
                System.Console.Out.WriteLine("IN web service" + "\r\n");
                double TotalCoalProd;
                SqlConnection conn = new SqlConnection("Data Source=engr-misom-sql3.catnet.arizona.edu;Initial Catalog=SimulationEntities4;Integrated Secuity=SSPI");
                conn.Open();
                SqlCommand cmd = new SqlCommand("select Sum(DISTINCT(production_tons_now.Tons)) AS 'TotalCoalProduction' from dbo.Simulation.production_tons_now where production_tons_now.Material = 'COAL'", conn);
                TotalCoalProd = (double)cmd.ExecuteScalar();
                return TotalCoalProd;
            }

            // Add more operations here and mark them with [OperationContract]
        }

    Can you help me on this?

    Tuesday, March 6, 2012 4:40 PM
  • Hi VinayBhargav,
    Thanks for your question. I have checked the link you provided and found out that there was only a sln file. I can't reproduce your issue only through this file.

    A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
    A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll

    Based on your code, it's hard to say what is the main issue. Thus, I would recommend you catching the exception.  You can open Visual Studio and click Debug menu->Exceptions at first. Then check "Common Language Runtime Exceptions". In this way,  the debugger whill stop when an exception is thrown. This will help you to find the issue and resolve it. If the issue hasn't been resolved, please try to provide more information. 

    Best wishes,

    Friday, March 9, 2012 2:42 AM
  • Hello Catherine,

    Thanks for your reply. I did what you told me to do. Here are my findings

    Unauthorized acess exception occured

    --Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_d4e6b3a9196672.tmp' is denied.

    SecurityException Occured

    --Requested registry access is not allowed.

    00000000  push        ebp
    00000001  mov         ebp,esp
    00000003  sub         esp,8
    00000006  call        FFA3E208
    0000000b  mov         dword ptr [ebp-8],eax
    0000000e  mov         ecx,583C3C88h
    00000013  call        FFA16E20
    00000018  mov         dword ptr [ebp-4],eax
    0000001b  mov         ecx,dword ptr [ebp-8]
    0000001e  call        FFA181E8
    00000023  mov         edx,eax
    00000025  mov         ecx,dword ptr [ebp-4]
    00000028  call        001917AC
    0000002d  mov         ecx,dword ptr [ebp-4]
    00000030  call        FFA16EA8
    00000035  int         3

    Will this help to answer my question.

    Thanks

    Vinay

    Friday, March 9, 2012 5:26 PM
  • Hi,

    --Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_d4e6b3a9196672.tmp' is denied.


    According to the description above, this issue will occur when you're trying to run with non-admin privileges. Thus you need to configure the ASP.NET to run under your account and reset the permission. Please try to go to the direction of the .net4.0 at first.
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\
    Then run the command below:
    aspnet_regiis -ir
    Please see the similar thread below:
    http://forums.asp.net/t/1165113.aspx/1

    SecurityException Occured

    --Requested registry access is not allowed.

    This error will occur when ASP.NET application tries to write new EventSource in the EventLog.  In order to resolve  this problem, a user who has administrative rights must create the event source before you run the ASP.NET Web Application. Please check the link below for details:

    http://support.microsoft.com/kb/329291

    Best wishes,

    Monday, March 12, 2012 3:10 AM
  • Dear Catherine,

    Thanks for your help. I figured out the issues and fixed it. I thank all those who offered help.

    --

    Vinay

    Friday, March 16, 2012 9:28 PM
  • how did u fix it man ? post it so that others will be benefitted

    Wednesday, May 31, 2017 1:30 PM