VB.Net web app Delay in breakpoint hit - vb.net

I am working on a VB.Net web application. If I placed a break-point in Page_Init event of the page. After hitting reload in browser, it takes around 5-6 seconds to hit that break-point. Whereas in my other application it hits almost instantly.
Any help on this would be a great help for me. Thanks in advance

I find out the problem. My application uses microsoft assess db. Those db files(.mdb file) are placed inside the bin folder as some of the db file is required by a third party dll to be place in the same location as the dll. Now I placed a copy of the .mbd file in the App_Data and changed the connection string accordingly. Now I got tremendous speed improvement.
This behavior was really strange. It's not taking time to complete the db call and get the result. It was taking time to hit the server method.
Anyway this solution makes my day. I post it here just in case someone else face the same and this might help.

Related

MS-Access 2007: Error while trying to open a form: "There isn't enough free memory to update the display. Close unneeded programs and try again."

I was trying to create an area map to display information programmatically... I added several rectangles to it (around 500) and when I tried to turn it to the form view from design view (without adding any code), it displayed the memory error... I closed the form and then the application and restarted my machine, but since then even though the rest of the application is running fine but the form I designed is not even opening (in either of the views), and displays the above-mentioned error each time... I have spent considerable time designing this form and would very much like it to work... I am no access expert and have just some workable knowledge... will appreciate any pointers to a solution.. thanks

Data source name not found and no default driver specified

This error is occurring on every *.asp page in the application, but the *.aspx pages work just fine.
I did not develop the application, but the person who did has long since left the company. We have about 20 customers, all with the program working just fine. One of the customers had their server crash, and we had to re-set it up on their new server. Everything is working just fine now, except for this error on the *.asp pages.
The same connection string is used for all of our customers, so I know the problem is not there. There are no system DSNs or user DSNs defined on any of our customers.
This is a 32-bit application on a 32-bit server (server 2003 with SQL 2005).
I'm pretty sure it's a permissions or setting error, but I have checked absolutely everything I can think of.
Please help.
A company with 1400 employees can't use this program until I get it back up and running. I have no idea what else to do.
Thanks everyone for your help.
Sorry it took me a little bit to respond to you, but I had heard back from the original developer, and he had a hidden connection string deep within the program specifically to trip someone up if they were trying to install the program without authorization. He gave me the info I needed and it worked beautifully.
Thanks again!

Does WIndows Search(Win 2008R2)/Indexing Service(Win2003) has any impact on Directory.GetFiles(searchPattern, SearchOption.AllDirectories) method?

We are having a strange issue with Directory.GetFiles method trying search for a Word Document from a UNC Folder Share (NTFS Disk) on a Win2008R2 VMServer. The share contain over 10K Files in the Parent Folder and 75K Files in a SubDirectory.
It was all working fine in Win2003 Server. When migrated to Win2008R2 Server, the WinForms application freezes over this method and taking almost 13 minutes to Open a single File from a Client machine connected to the File Share via a VPN Network that has Download Speed bandwidth of 1Mbps (not throughput).
After search & research, we realized the Windows Search service was not turned on and the Service was started and the share was indexed. We saw a performance improvement where the time taken to open a file using GetFiles Method came down to 3 Minutes from 13 minutes.
But this is not consistent. During day time when bandwidth is much lower than 1MBPS (say 0.5 MBPS) the time-span to open the document is again between 8-12 minutes.
At this point we are not sure of which one is causing the problem?
Not possible solutions:
1) Creating multiple directories and organizing files.
2) Increasing bandwidth.
3) Using direct filepath instead of Directory.GetFiles/EnumerateFiles
Any help is highly appreciated. Thanks!
Oh yeah, good stuff. You will notice that even if the service is off, running it twice (within a short tiem of each other) will run much faster the second time. Actually, here is a good one for you, run it twice, let the first one run for a minute. The second one will catch up the first one almost immediately and then they will both be at the same spot for the rest of the time. (if what I said makes sense).
Here is what is happening, GetFiles() and GetDirectories() do use the indexing service. Also, if your indexing service is off, this just means it will not automatically get data about the files, but when you access the file (windows explorer / GetFiles) it will index them, so that if you ask for the same thing with a set amount of time, it wont have to query the Hard-Drives' Table-Of-Contents again.
As far as it running faster and slower when the indexing service is on, this is because windows knows it cannot keep track of every file on the computer. Therefore, after a set amount of time, the file is considered stale and the indexing service will do an IO call to get the info to update the index database, when you ask about the file.
This wiki talks about it, just a little. Not very thorough.

Visual Basic / ASMX - how to use application cache variable?

I'm trying to amend our content management system so it'll handle SQL database failures more gracefully. It's a bunch of ASMX pages, and a Helpers.vb file in which I've written a SQL connection tester function.
Each of the ASMX pages call the same function.
I need to create a variable I can check that's persistent and performant, otherwise I'm going to have fall back on something disasterously slow like reading a text file every time I set up a sql connection string.
I've tried using application caching, but either it doesn't work in the context of my helpers.vb file, or I've made a mess of the syntax. One problem that's already stymied some of the approaches I've found via google - I can't use 'Import System.Web.Caching' - IntelliSense doesn't show the 'Caching' part.
Has anyone got any example code that might get me up and running? Or an alternative approach?
#Mike,
Many thanks, now I'm using HttpRuntime.Cache correctly... it works!
Thanks everyone for taking the time to post :)

why server.transfer process slow in vb.net?

I need your help, I have a problem with server.transfer code in vb.net, it runs so slow..
My Question:
Why does it run slowly (take 5 minutes to move between web pages (.aspx))?
What should i check for this trouble?
Is it because operating system? Im use windows 7, before i used windows XP there is no problem like this...
is server.transfer related to database connection (not sure)? I use mysql (XAMPP packages).
Or may be because other configuration that i miss out in windows seven.
FYI: i try in several web browser same result(loading 5 minutes)..
Thank every one that answer my question, thank you very much!
One thing I've found on this is that it can have to do with the status code the transferred page returns. If it returns a 500 error, it can make your server transfer run upwards of five minutes.
One way to test this, if you can, is to run the transferred page in isolation and generate any of the information being transferred on the other side to see if any errors are generated.
It took me a day to figure this out. Hopefully it helps someone else.