I have been some time using asp.net charts, even it was hard to config for asp 3.5 and to make it work, I have been able to move along with all my project but I'm facing something that I have no idea how to solve.
This project works perfectly on my develop enviroment, but when i deployed it on the server, the only page with charts on it appeared like this:
I assume its cause of the charts because its the only thing that really have given me problems and its the only thing that its exclusively on this page but i have no idea how this happens, it only happens on the server with Plesk.
Tried to upload on debug instead of release but the result is the same. Searched overall but never found anything like this.
My Answer may not give you the exact solution. But it may give you an idea's.
Below are my Ideas:
Make Sure you have included all the files into your solution when you do the Build.
Make Sure you have all dependency of Asp.Net Charts in Server.
Check you browser Console and Browser Network. Press F12 in your and check. You can get to know the Exact problem if any issue in loading prob / dependency files.
Double check your server configurations for the charts. And compare your local and server configs.
Do the Deployment in your machine itself and check one round.
Related
Asp.net app runs fine without issues on localhost. However, when published and I access via Chrome/Edge it does not work as intended (will not load the page when button is clicked). Is there a way to see what the live published version is doing in the code?
Tried replicating the issue in Visual Studio Debug, but could not recreate it
ASP.NET code is executed on the server, so there’s not a lot to see in the browser. You can use the Chrome/Edge developer tools (F12) to see what it is seeing, though. There might be helpful information in the console and especially in the network tab, where you can see what requests the app is making and what the server’s responses to them are in some detail. (I’ve had problems with web apps making assumptions about their path that didn’t apply once they were installed.) If you have sufficient access to the server, it might be helpful to look at its logs, especially if your app is returing 500 errors. It’s often a good idea to implement a lot of logging in your web app, using NLog, log4net, or similar libraries. Again, though, you have to have permission to write the logs and to look at them when you need to.
Please follow the normal debugging workflow:
Load a page in your browser.
Open the developer tools.
Select Sources tab; Open HTML file; Open JavaScript file.
Set a breakpoint in the JavaScript file.
Reload the browser page. Loading stops at the breakpoint.
Debug until you find the problem.
Fix the problem (in your usual code editor, not in the developer tools) and save the file.
Debugging tools are supported by most browsers and environments, which make debugging easier by stepping through the code so you can see what's going on.
Today i made a quick template for a landingpage and wanted to test it on my webhotel. I have never actually published a website on a webhotel before, but the initial process in asp.net was pretty flawless.
The way i got my webpage onto the server, was by publishing my project and transferring it to my server on a FTP connection.
However, when i open my up my webpage, it only shows the html code, which is really weird. .
http://bkrt.dk/Index.aspx
What may i have done wrong, and How do i solve this issue?
Turns out that my webhotel doesnt support .aspx, but only php!
- Solution is that i either change webhotel, or do a full convertion to html, which seems to be no option. I will therefore look for a webhotel with asp.net support.
Using ASP.NET 4.0, IIS 7.5.
I have a website engine, I have just implemented a way for this to tell if it's being loaded on mobile and instead of loading Controls\MyControl.ascx it loads Mobile\Controls\MyControl.ascx. This works well for my controls and also my MasterPage.Master file.
What I can't figure out however is how I can do the same with Default.aspx. This needs to be done on the fly programatically as I need to be able to check if it's mobile version. I was thinking of doing something on a pre-init event in globals but not sure if that's the best way.
Note: I don't want to use inline code on Default.aspx and just display different content base on my Mobile flag as my scenario goes one step further by basing the file on customer as well and this would mean having one huge Default.aspx for all customers which wouldn't be manageable.
Changing the default document on the fly is not possible in any practical sense.
Writing to the web.config on the fly to load a mobile version of a default page is quite frankly terrible and not an answer to the true context of your issue. I would feel irresponsible as a developer if I even proposed this as an answer to loading a mobile version of a default page.
I was trying to help you solve your problem and not just answer the base question in the title. As we all know, changing the web.config will restart your application and would not serve as a true solution, as you could not do this and achieve any kind of performance.
Here is the BEST alternative (IMHO) to dealing with mobile browsers.
http://51degrees.codeplex.com/
HTH!
For anyone else looking at this I have found a solution but I am not sure I will implement it as I don't like the idea of updating the web.config file at run time. Using the Microsoft.Web.Administration namespace you can update the server.webServer -> defaultDocument section programmatically. Doing this allows you to change the path to default.aspx and it will load based on the variables you set.
This link should provide more information: http://blogs.msdn.com/b/saurabh_singh/archive/2007/11/24/accessing-iis-7-0-features-programmatically-from-configuration-file-s-c.aspx
Also, the Microsoft.Web.Administration dll isn't available directly in VS so you need to add it from %windir%\syswow64\inetsrv (64bit version).
As a company for years we have worked using old ASP (vbscript), we have just started updating to c# .net. our first MVC3 project is ready to be uploaded to the web server for testing and to iron out any bugs.
After reading about it I have made myself fairly familiar with the theory of it.
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
Have all been set to copy local 'true'
Right clicked the solution and selected 'Publish'
Created a new profile
Filled in the connection details, although I am unsure exactly what is meant by the 'Site Path' and 'Destination URL'
As it stands the site path is the scripting path and the destination URL is the URL as it would be typed into an address bar in a browser.
connection does validate.
in setting I have selected release
The there is a little tick box which seems scary to me, it says "Delete all existing files prior to publish" The server I am uploading to contains all our live and test websites, although I have created a new folder for the project, I under no circumstances want it to touch, edit, modify or delete anything else on the server. So this box is unchecked. Can anyone verify that leaving this unchecked will ensure it does nothing to anything else on the server?
Then in preview it simply says "Your application will be published to: (IP address of server)
Can anyone who has done this before give me some guidance this is the correct method to go? I could do it will less worries through a normal ftp but would like to be able to utilise Visual Studios tools. Its Visual Studio 2012.
Sorry if this isn't the exact correct place for this question.
After trying to do this for a while I discovered that publishing to ftp was a waste of time and the hard way to go about things. Although probably alot of you know this.
Instead I just published to a system file and then uploaded it with cuteftp to the web server. This maybe isn't the most professional way to go about things but from someone that comes from a primarily web scripting background, I found this alot less confusing and alot easier to manage.
I just thought I would answer my own question to resolve this thread.
Background
I'm trying to implement a simple web server part as a web interface to a desktop application.
I first tried HTTPListener which worked but required admin privileges (in some way or another) which I felt was unnecessary. I'm now trying a TcpListener based approach.
Progress
Serving files works good but I'm having a problem with file uploads. I basically tried to use the answer found in another question but instead of plugging in HttpListenerContext.Request.InputStream I used TcpClient.GetStream().
Problem
The problem is that this seems to be working very randomly. Sometimes it works fine but most of the times it doesn't. When it doesn't work the thread doesn't seem to do anything until I press abort in my browser and it proceeds to throw an exception "Start boundary not found" (see the code in the link).
Question
Now, my questions are:
Am I doing this the right way or are there any simpler way to create an HTTP server (third-party libraries included)?
What could be the possible causes for my problem?
What parts of code would you need to see to help me further?
Cassini project is what you need. Also you can look at XSP in mono.
You should be able to embed those projects into your code and host ASP.NET. If that is not possible you can start looking XSP sources and implement the web server part yourself.