I've been trying to solve some UI issues I had on my website.
I realized that my web app was moving textboxex, dropdownlists, etc.. when after I was putting values on them.
They passed from being on the left to be on the right side of the div, weird things like that.
Well, this is the behaviour I saw when I was debugging or running from my VS2010.
Then I deployed the website and loaded into my server.
..And for my surprise, this behaviour was not happening.
Did anyone see this before?
Why is this happening?
What is the difference between debug the website, start it on the browser without debug or publish it?
I would suggest that you try debugging under IIS Express instead of the VS development server. Sometimes there are subtle differences between VS Dev Server and IIS, especially when you are dealing with things like session.
Problem was related to style issues.
Tried with more specific styles, not letting them grow bigger than it should
Related
I work on several C# backends that serve up through kestrel and the whole thing is developed and deployed in dockers. Everything works fine, but I would love to get hot reload working for development.
There seems to be 2 different issues
Although all projects come from a common source, some show the hot reload button, others are disabled
Those where it is enabled, it doesn't work. I'm afraid I can't recall the exact error and the projects I have to hand aren't offering it, but basically it's along the lines of not possible
Is hot reload of changes in this scenario possible?
At this time, hot reload is not supported in the Container tooling for Visual Studio. It is something that is being investigated and is being tracked at https://github.com/microsoft/DockerTools/issues/322
I was working on different apps on my Visual Studio Code, so i was debugging two different applications. However, the CSS effects and NavMenue suddenly disappear from on of them and when I debugged it, I got like the following picture.
In the debugge console i got this :
I've not changed anything in the code. Does anyone know what is the reason and how can I solve it ?
Note: when I open the local host from different browser it works well
I've solved the issue by Clearing the Last hour browsing data from Chrome.
This includes Deleting the following:
Browsing History.
Cookies and Other sites.
Cached Images and Files.
Then everything works well!
Note: Ctrl F5 doesn't work so it is better to delete the above information and then try again.
I'm using VS 2012 express to build a "multi-tenanted" website with MVC4. The website itself is all going swimmingly.
In order to ensure separation of concerns, I have a plugin type of architecture, whereby I have other projects in my solution, one for each "tenant" so to speak. This means I can have a core website and just plug in a tenant plugin when required.
This appears to work fine. How it works is that on a build, various files get xcopied into the host site. It's a slight nuisance that a change to a .cshtml for example, I have to build to get the latest, but no matter.
I did also have problems trying to connect the database for the host with the database for the tenant through linq (so that I could have user specific data from the tenant, based on the logged in user on the host), but that is working now.
However, I am now hitting a bit of a road block and it is drastically slowing me down.
Because the files are xcopied, they don't appear to come under the debugger, so putting in a breakpoint on a tenant controller has absolutely no effect.
Does anyone know (or have any ideas) on how to debug the tenant DLL? All ideas would be appreciated. Thank you.
I've done it again... been puzzling over the problem for quite a while and then worked out how to do it.
In the "tenant" project properties, click "Web". CHECK "Override application root URL" and use the same URL as the host website.
Basically, the host is using IIS Express, on http://localhost:51402 the "tenant", even though it is not the main project was using http://localhost:49931 so was not getting connected as the tenant project was not technically being run.
Making it use the same URL by overriding application root URL allowed it to connect.
EDIT
Now, I am not so sure that the above actually solved the problem, partially solved it or was just timing that made it look like it solved it.
Reason being, I had it happen again where it didn't debug. However, hovering over the breakpoint, it said the source was different to what is currently running. This confused me a little.
It seems that when a build happens by clicking the green go button, the post build events that are in the properties are not executed. In the post build, I have the xcopy to copy the files over to the host app.
So, that means I have to build by hand, then run the green button (and build again).
I'm now working on some pretty big application with really nasty code. The problem is that from time to time the whole GUI of the app is freezing and stops responding (and after some time Windows wants to take the app down). I have a really big problem to even look where to debug the app, mostly because when this thing happens and I pause it in the VS debugger, it highlight the line:
CardWindow.ShowDialog();
It's not helpfull at all. Also when this thing happens it tends to grow the app size in the memory, ocasionally throwing OutOfMemoryException.
I also checked whether it might be some kind of an infinite loop in one of created threads, but VS shows me that only the main thread is active, and the rest are either ended or not running at all (the thread implememtation is also really poorly written).
The application uses remote objects within local networks, and some threads are used to transfer photos and other data from clients to server, but I don't know how to check if this is what it's causing it. But when the server app hangs, the clients are still fully capable to connect with it.
Short info of how it's made: the app uses Firebird engine to store its data. The DB is on the server machine, and the clients are connected via local LAN to it using standard Firebird C# library, and the app instances communicates with each other using remote object (the server is also a client).
It's the second week of debugging and I'm getting pretty desperate as I'm getting out of ideas of even how to check what's wrong. The fact that the bug appears randomly also doesn't help.
Can anyone give me some ideas of how to find a trace of this bug?
Using C# .NET 4.5 and WPF with Visual Studio Ultimate 2013 and Firebird 2.5
I'd suggest using a profiling tool to assist in finding the problem
What Are Some Good .NET Profilers?
In addition to #DerekTomes. The System.Windows.ShowDialog method, Described in: Window.ShowDialog Method, all other windows are disabled and return only when the window is closed. Check to make sure the window is eventually closed(this.Close() in the CardWindow.xaml.cs or whatever .cs file) or use CardWindow.Show() instead of CardWindow.ShowDialog() so other windows remain running while the CardWindow is running.
I finally figured it out.
When the function that usually hanged the app after 30th run launched, I could see that some of it ran (the window's title changed as it was supposed to). I've found this function and after every single line put:
this.Title = "1";
SomeFunction();
this.Title = "2";
AnotherFunction();
this.Title = "3";
// and so on
I localized what was causing the problem; there was a function that changed the GUI significantly (lots of foo.Visibility and foo.Opacity) and ran in some weird loop. It was fine for the first 20 times to run it, but after 30th it slowed down the app, and after 40th - caused crash.
It now runs only once when it needs to and the problem does not appear. I suppose it caused GUI memory overflow of some kind.
Anyway, thank you for your answers - I ran memory profiling, but it slowed my app down to that point it was impossible to use it.
I have a very odd problem. I've written a little inhouse app which scrapes a load of URLs, performs HEAD requests to get the size and populate a ListView control. Everything works fine when I am running it inside Visual Studio when debugging, but when I deploy the listview does not populate. The 2 are making exactly the same calls consistently. Does anyone have any idea what may cause this to happen?
Thanks I was able to find the solution by attaching the debugger to the process... many thanks to all for answering. I know this is a trivial question...
Many thanks
JT