We just moved an ASP.net application to a new server and are now getting this error when we try to return to a page: Http/1.1 Service Unavailable
In testing, I find that the address of the page does not include the SSL designator. It is trying to use http:// instead of https://. This value is coming from the Context.Request.Url property of the page.
why Context.Request.Url would not return the "https" for a page under SSL?
The site is written in vb.net, and accessed via https.User randomly meets the warining dialog"This page contains both secure and non-secure items.Do you want to display the non-secure items?", after clicking 'Yes', 404 not found error page will be displayed, but by refreshing, the warning dialog and 404 page all gone. Also by viewing source code from IE, I found '<meta content="Http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">' where only uses http protocol, Does this have any thing with the error user meets?
I'm using membership and roles in a Silverlight Business Application. There is a RegistrationOperation_Completed event in the RegistrationForm.xaml.cs code behind file with:
where I would like to obtain the UserId that was created for the newly registered user so that I can use it as the key to populate a userdetail table. How do I get it? All I have is the UserName that was used to register the new user.
WebContext.Current.User does not appear to return the UserId.
I have an update function in my data layer which is defined as:
public int UpdateRBTable(parameters ...) This calls a SQL Server Stored Procedure to perform an update function on the database.
The process does its job for updating the table. However, the stored procedure has a return value (which indicates how many rows were updated), but this return value is not returned to the application. The application always shows that a zero was returned from the stored procedure.
I need to create an ASP.net web page application displays a report based on XML data.
I'm told that I must get my XML data from https://www.example.com/foo.xml. I would like for my ASP.net application to get the data server side, interpret it, and display a report.
I need to know to things:
1) How do I make the .net framework retrieve the XML data from https://www.example.com/foo.xml at run-time.
2) How do I get the data set to an appropriate object type so that my program can read it?
I have an asp.net web service which has SSL enabled via IIS. It works fine if the user uses https, however I have a user that insists on using http on the url.
What I'd like to do is have the web service (asmx) do the equivalent of the response.redirect to change http to https automatically.
I don't believe that I can do this from a web service so does anyone know a of a similar solution for web services.
I am facing the issue "The page was not displayed because the request entity is too large."I am using ASP.Net 3.5, Sql server2008, IIS 7.5 and OS Windows 2008.I am finding the issue on following scenario:1. The error only shows up if the page is viewed as HTTPS (SSL).2. After login in the application if user waits for 1 min or more before doing a postback.Page size is about 200kb. It is running quite fine on Http.
I need to write a system to generate HTML email from a data model -
I was going to create a templating system to build the model into an HTML representation using HTML 'fragments' stored in an xml template. But it occurs to me that these it might be better to use asp or asp.net than write my own templating system?
What I am wondering is whether/how it would be possible to use asp (maybe asp.net mvc?) to return an HTML string - I wouldn't be running on a web server, or in response to an HTTP request.
I have not done any asp or asp.net yet- My experience of ASP stretches to 'Create new project' in visual studio -
I'm trying to retrieve posted JSON data on server side in an ASHX file via this code string strrequest = context.Request["OrderInfo"]; but it always return null. What Am I doing wrong?
my application in vs2005 / 2.0 framework , right now i change it with VSD08 /3.5 framework according when i change it open it with 08 at first time it get ask me ( you want to convert the application framework 2.0 to 3.5 ) i said yes , after that i was trying to run the application it get works on that machine means on ( locahost) but not able to access that on netowork its shows an error:
The name 'xxx' does not exist in the current context ( if i try to run any function within app_code ) then it shows me shuch error i wan also rebuild my appliciton , but noting get happen shall i create a new project and then copy my old code?
I'm using a custom ashx handler to handle a file upload. When run locally, the file uploads fine.When I use the same setup on the web server I get a "Index out of range" error.In firebug I see the binary contents of the file in the post data and the file name is also passed in the query string.Any one seen this before?I`m sure its something minor, but its driving me up the wall.
Request header: Key Value Request POST /Secured/UploadHandler.ashx? HTTP/1.1 Accept text/html, application/xhtml+xml, */* Referer http://cms.webstreet.co.il/Secured/fileUpload.aspx Accept-Language he-IL User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) Content-Type multipart/form-data; boundary=---------------------------7db13b13d1b12 Accept-Encoding gzip, deflate [code]...
I have Called a Function " GetPhotos" from Designer Page (source). Getphotos() is in Code-behind Page. It runs well When i only Build the Application. But when i Publish the same application using "fixedName and single page Assemblies" option Enable, it Returns an Error
Compiler Error Message: CS0103: The name 'GetPhotos' does not exist in the current context.
I'm creating a Page object and adding a control to it for printing purposes. The code works, however I can not find a way to add a stylesheet link to the header. In the code I pasted I'm trying to add a link to the header and then add the header control to the page, but this causes an error:
Request is not available in this context System.Web.UI.Page.get_Request() +8700216 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer) +83.....
i have a Class named Helper.cs inside my App_Code folder. And i get this error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'Helper' does not exist in the current context
Source Error:
[Code]....
And i know my compiler recognizes the Helper class because the 'Helper' is colored in cyan... means is known by the compiler. What am i doing wrong?
I have a PHP website and I am looking to convert it into ASP.NET. So I am learning ASP.NET and I needed a way to upload multiple files to the server. So I ran across this tutorial: [URL] I did everything correct, but I get this error:
Compiler Error Message: CS0103: The name 'Path' does not exist in the current context
Source Error: [Code]....
Source File: c:UsersUser1DesktopUweaveLigues Hockey SimulesViewsAdminFormIndex.aspx Line: 18
im getting this error CS0103: The name 'ProjectName does not exist in the current context, im getting this error on Global.asax. i tried to clean and rebuild but its not working, please tell me how to resolve it?
We are using membership provider for LDAP authentication. It is working as it should.
But what all configuration settings I have to do so that all the future requests to this application run under the security context of the Logged in user account not through the some default user set in IIS.
We need to have this working because all the permissions on the database are based on the logged in user.
We are using form authentication for LDAP authentication. And having impersonation = true in web.config.
I'm trying to add a LINQ datasource to my ListView control but it doesn't pick up the data context that I created. All it shows as options in the dropdown list are AJAX objects. What could be the possible causes for this?
I am working on a contact form. i am getting an error below, here is my code:
[Code]....
And here is the error i'm getting:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0103: The name 'txtEmail' does not exist in the current contextSource
Error:
[Code]....
Line 20: try Line 21: { Line 22: MailAddress fromAddress = new MailAddress(txtEmail.Text, txtFirstName.Text + " " + txtLastName.Text); Line 23: Line 24: // You can specify the host name or ipaddress of your server Source File: c:HostingSpacesartofmouldingartofmoulding.comwwwrootcontact.aspx.cs Line: 22
CS0103: The name 'lblRegion' does not exist in the current context
Source Error:
[Code]....
Line 31: {Line 32: Line 33: lblRegion.Text = dt.Rows[0]["RegionName"].ToString();Line 34: lblCountry.Text = dt.Rows[0]["CountryName"].ToString();Line 35: lblCountryCode.Text = dt.Rows[0]["CountryCode"].ToString();
this is source code: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Net; using System.Xml; public partial class CSharp : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //Get IP Address string ipaddress; ipaddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (ipaddress == "" || ipaddress == null) ipaddress = Request.ServerVariables["REMOTE_ADDR"]; DataTable dt = GetLocation(ipaddress); if (dt != null) { if (dt.Rows.Count > 0) { lblCity.Text = dt.Rows[0]["City"].ToString(); lblRegion.Text = dt.Rows[0]["RegionName"].ToString(); lblCountry.Text = dt.Rows[0]["CountryName"].ToString(); lblCountryCode.Text = dt.Rows[0]["CountryCode"].ToString(); } else { } } } private DataTable GetLocation(string ipaddress) { //Create a WebRequest WebRequest rssReq = WebRequest.Create("[URL]xml/" + ipaddress); //Create a Proxy WebProxy px = new WebProxy("[URL]+ ipaddress, true); //Assign the proxy to the WebRequest rssReq.Proxy = px; //Set the timeout in Seconds for the WebRequest rssReq.Timeout = 2000; try { //Get the WebResponse WebResponse rep = rssReq.GetResponse(); //Read the Response in a XMLTextReader XmlTextReader xtr = new XmlTextReader(rep.GetResponseStream()); //Create a new DataSet DataSet ds = new DataSet(); //Read the Response into the DataSet ds.ReadXml(xtr); return ds.Tables[0]; } catch { return null; } } }