I am writing my first ASP.net Web Application using VS2015 and IIS 7.5. After I make changes in the code and save, I right click and hit View in Browser to see the page. A new tab opens in Chrome and the page comes up fine, but when I go back to the aspx page and make some changes and resave, when I try and refresh the browser tab that opened earlier I get 'This Site Can't be Reached Localhost refused to connect'. I then have to go back to VS and right click and View in Browser again which opens a new tab and the page works. Is there anyway to keep the original tab that opened persistent so I can just refresh it to show code changes? It's a bit tedious having to open a new tab for every change. Thanks.
Edit: seems to be a timeout issue as it doesn't matter if I make changes at all. Trying to refresh the browser after 20 or so seconds causing the connection refused error.
Turns out I have an asp:repeater that builds a table. The table had over 4000 rows in it. When I removed the table or when I reduced the rows to under 300 I was able to refresh the page as many time as I want. As soon as I bumped the rows back up to 4000 the issue came back. Not sure why the amount of data was an issue though.
Go to Tools-Options
Under Projects and solution -> Build
Run select "Always build" under "On Run, when projects are out of date"
Related
When I compile, I want the browser to go to that page instead of going to the log in page, when I set it as Startup page, VS starts not responding and freezes the screen. This is a very simple question but I cannot find the answer to it.
For an .aspx page, many possible reasons could cause "VS starts not responding and freezes the screen". I would suggest that you check your aspx file and the code behind file to see if there is any database connection and it loads large amount of data. Any pre-initiate program error could also bring page load failure. You may try move your GUI code to a separate html file and then view it in a browser to see what happens.
I have a customer portal with a few reports in it. When I click a report link on the parent page to view a report, a new window opens (window.open) which contains an ASPX page, containing a reportviewer control.
The report runs (less than 30 seconds):
But then something strange occurs.
If I remain on the parent page, 15 minutes later, the browser is unresponsive. I cannot browse to any other pages on the site, I need to close and reopen the browser to continue. If I do NOT choose a report, 15 minutes later the browser is fine.
I've used network tools to see what the network calls looks like, and all I get is that a call was initiated.. nothing indicating a hung HTTP call, etc. It just.. stops.. If i browse the site immediately after running the report, it's fine! But if I hang out on the parent page after running the report (even after closing the child report window) I get the unresponsiveness.
There is a limited set of compatible browsers, especially on older versions of SQL Server SSRS. I would always recommend IE, which it looks like you are not using?
Here's the compatibility info (for SQL 2016, there's a version selector at the top of the page):
https://msdn.microsoft.com/en-us/library/ms156511.aspx#bkmk_reportviewer
Not really the solution, but finally found a more permanent fix for this. I developed a separate website that hosts my ReportViewerControl. I then developed a web form that loads with a meta refresh, after 3 seconds the page will "refresh" and redirect to my secondary ReportViewerControl website.
Something "goofy" was happening here, the session was getting locked up, almost like the more complex the report, the longer the session was locked up, the more of a chance the browser hanging. Something with the meta refresh and the secondary website causes the session to be completely disconnected (I think???)
There's probably no other person in the world that will have this issue, but if it does, at least others know my story =]
Ok, so I've done it a hundred time or more, but today - got a new problem.
created a simple html page with an image
uploaded to a server
opened the page in the browser - no problem, all works fine.
created a new app, selected "tab" and insert the tab name, the http and https url
Tried to view the app and got "The page you requested was not found"
I've checked with other iframe tabs that I've built, they all configured the same, yet the new one - fails to load.
I've seen that the interface has changed a bit, Its not unusual that Facebook breaks things from time to time but maybe I'm missing something?
Edit: also, from some reason I don't have the "View App Profile Page" on that app
They changed some things around, profile pages are no longer being made. Check this out http://developers.facebook.com/blog/post/611/
Although I'm still having problems with getting errors when I try to add the app
What is the best way to keep session state between browser tabs?
I have the following scenario. I have a page where the user opens a 'project' from a grid.
I keep this project in the session as the "Current Open project".
The problem is that users can open another project from another tab in the browser. Now, they open another project and this becomes the new "Current Open project".
If they go back to the first page ... it is clearly a problem.
Is there a way to solve this situation please?
Thanks,
Joseph
No, you just have to handle it.
When a page tries to do something with a project, the server has to check if it's the current project that the page is trying to change or a different project, so that the server can send an error message back that the wrong project is opened.
Alternatively you can avoid keeping the current project in the session, and allow multiple projects to be opened simultaneously. As long as each page keeps track of which project it is handling (which you have to do anyway), it's not a problem.
I have a web application that runs perfectly fine when I use the Visual Studio 2010 development server (Cassini). However when I try to use IIS Express to host the site Chrome just displays a "Bad Request - Request Too Long" error. The IIS Express site does display in other browsers (FireFox and IE9) so I'm kind of confused. The error occurs in Chrome when I try request pages in my application or even basic resources like an image, so I don't think it is an issue with URL rewriting or routing.
Just to see if the problem was somehow a result of my site's code, I created a new MVC3 website and tried running that. This worked in the VS development server, but once again produced the "Bad Request" error when running under IIS Express.
I am about to start testing the site using some mobile devices so I need to get this running under IIS. Any suggestions would be greatly appreciated.
EDIT:
The root url of the site (http://localhost:50650/) is being requested using GET. I am currently using Chrome v12.0.742.112.
I get this all the time ONLY in Chrome and I have to clear browsing data to fix it.
Wrench > Tools > Clear Browsing Data
Check the following:
Clear browsing history
Clear download history
Empty the cache
Delete cookies and other site data
Then click "Clear Browsing Data" button and refresh your page.
UPDATE:
I figured out that it has to do with writing too many cookies to the browser and that if you just close all instances of Chrome, the error goes away for a while. To prevent it, you'll need to clear out your cookies programmatically.
Instead of clearing all the cookies, just do the following:
Right click the lock in the address bar area (see picture below)
Under cookies there is a link saying how many cookies are used
Click that link
Remove all cookies in there (or just the troublesome if you can identify them)
Problem gone
This error is caused by a corrupt cookie for the website you are trying to view, so to clear it all you need to do is clear the bad cookie(s) for that website.
In Chrome, go to...
chrome://settings/cookies
(Or manually go to Settings->Advanced Settings->Privacy->Content->All Cookies and Site data)
From there, you can search for cookies that match the site you are having problems on. Finally, click "remove all" for the matching cookies.
The problem is usually that the site in question has accumulated too many cookies or created cookies which are too large, making the HTTP headers swell beyond the allowed maximum.
One-time work-around
As has been mentioned, you can go to Settings|Advanced|Content Settings|All Cookies and Site Data, search for the site in question, and delete the cookies using the X button on the right. This reduces the header size of the HTTP request when contacting the site.
Long-term work-around
In addition to removing them one-time, however, you can prevent further problems with heavy cookie sites by going to Settings|Advanced|Content Settings|Manage Exceptions, and add the base site url (e.g. "msdn.microsoft.*" without the quotes) and select Behavior as "Clear on Exit". You might have to login more often to these sites, but this should prevent the problem.
I encountered this problem when using ADB2C login from ASP.NET WebApp. In Firefox you can do similar use case to delete related coockies and problem is gone for a while. Click on HTTPS (i) lock icon with, select ">" button on the right, select More information, select Security tab, click on View Cookies and click on Remove All. Done 4 a while.
If Above methods didn't work then enter
chrome://settings/resetProfileSettings
and Click on Reset Settings
This will reset your startup page, new tab page, search engine, and pinned tabs. It will also disable all extensions and clear temporary data like cookies. Your bookmarks, history and saved passwords will not be cleared.