I am running this piece of code to get the source code (as string) of my webpage.
The problem is why this function returns 404 error?
Private Function getPageSource(ByVal URL As String) As String Dim webClient As New System.Net.WebClient() Dim strSource As String = webClient.DownloadString(URL) webClient.Dispose() Return strSource End Function
why I'm getting this error? I just re-created (not migrated) my app that was in ASP.NET 1.1 to ASP.NET 2.0. Whole app works perfectly. The only problem I'm getting with this piece of code for the Web Services. I'm running both versions at the same time side-by-side and it works fine in 1.1 and doesn't work in 2.0.
URLName = Context.Request.Url.Segments URLName0 = URLName(0) URLName1 = URLName(1) URLName2 = URLName(2) URLHost = Request.UserHostName URLStr = "http://" & URLHost & URLName0 & URLName1 & "SomePage.aspx?" & "SectionID=" & SectionID ' Create a 'WebRequest' object with the specified url Dim myWebRequest As WebRequest = CType(WebRequest.Create(URLStr), WebRequest) ' Send the 'WebRequest' and wait for response. Dim myWebResponse As WebResponse = CType(myWebRequest.GetResponse(), WebResponse)
Bam! Error! The remote server returned an error: (500) Internal Server Error.
I have created a webservice to populate bookmark fields in a word document with values passed out from an adobe flex app. The document is based on a .dot template that is held on a share on the server. The aspnet user has read access to the share If i run the asmx on my local machine, it all works fine. If i run the asmx when deployed to the webserver I get an error "cannot create activex component" returned. I have set impersonate = true in the web.config on the webservice that is deployed on the server. The code for the webservice itself is very simple:
[Code]....
I have also checked that the microsoft.office.interop.word is in the gac on the server (i am using office 2003). I really don't understand what the issue is, obviously for the application to go live the webservice will have to be deployed to the server and I am happily calling other webservices that exist on the server from my flex application with no issues.
I have a simple Upload method that send the file to the FTP server, if the file name is already exist, i will overwrite the existing file in the server. This method is working fine.
[Code]....
I'm just wondering how would i be able to change the filename ( originalFileName+timeStamp) during the process of uploading to avoid overwriting of files? I did try changing the method property of WebRequestMethod to
[Code]....
But I'm getting an error
The remote server returned an error: (550) File unavailable (e.g., file not found, no access)
this is a bit of a strange one. have my front page of my intranet site and I am trying to pull an RSS feed from a subdirectory forum.
Root Default.aspx --->Forum --->Rssfeed.aspx
On my default.aspx I can pull RSS Feeds from the BBC or any other external website so my code is working fine but when I try and pull a RSS feed from my local server I get "The remote server returned an error: (401) Unaithorized".Now, if I go to the Forum directory within IIS and change the directory secutiry from "Integrated Windows Authentication" to "Enable anonymous access" the RSS comes through to the front page without any errors, however, the forum requires "Integrated Windows Authentication" to be enable to that my users can post on the forum. If I turn both on then Windows authentication is still ignored for my users when they visit the forum.I have hardcoded my credentials in to the Default.aspx.cs to see if that helps but I still get Unauthorized message.My code is here:
[Code]....
As you can see I have tried a couple of different ways to get the credentials to work, it just seems to ignore my credentials and I have full admin access to the server and when I visit the forum it picks up my username.
In IIS we have a virtual directory (named as "Documents") with in application virtual directory (named as "Reference") that points to an shared folder.All the files with in the "Documents" folder are listed and opened by the user (by clicking on the file name) with in the application
"Reference" application runs under an application pool. This application pool is configured to run with an Active directory account. This AD account has been granted write and modify permissions on the shared folder that contains the html files.
When user tries to open any of the html file located with in the shared location from the application following error is thrown.
System.Net.WebException: The remote server returned an error: (500) Internal Server Error
I tried to browse to the location manually and I can see the required files there.
These files where accessible from our application until yesterday. But we started encountering this error from today.
Is there any IIS settings that needs to be modified?
The remote server returned an error: (407) Proxy Authentication Required.I get it when I use the GetReponse() method in WebRequest Dim request As WebRequest = WebRequest.Create(getNextURL()) Dim httpResponse As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using ASPSnippets.SmsAPI;
[Code] ...
Also include AspSnippets.SmsAPI in solutionexplorer's Reference foldergot error at following line
//Single SMS SMS.SendSms(txtRecepientNumber.Text.Trim(), txtMessage.Text.Trim());the error is the web remote server returned error (403) forbidden
I want to call my WebService using HttpWebRequest, but I get Error:The remote server returned an error: (500) Internal Server Error. The webservice works fine through the following url: [URL]
I have a WCF Service that I have boiled down to next to nothing because of this error. It is driving me up the wall. Here's what I have now.
A very simple WCF service with one method that returns a string with the value, "test". A very simple Web app that uses the service and puts the value of the string into a label. A web server running IIS 6 on Win 2003 with a SSL certificate.
Other WCF services on the same server that work. I publish the WCF service to it's https location I run the web app in debug mode in VS and it works perfectly. I publish the web app to it's https location on the same server the WCF service resides under the same SSL certificate I get, "The remote server returned an error: (403) Forbidden" I have changed almost every setting in IIS as well as the WCF and Web apps to no avail. I have compared setting in the WCF services that work and everything is the same.
Below are the setting in the web.config for the WCF Service and the WEB app: It appears the problem has to do with the Web app but I am out of ideas.
using oAuth.net library for the Gmail Contacts API The request seems well-formed and I have stepped through the requests, and cannot discern anything wrong. Tried checking if the timestamp is an issue - it seems that was a common issue on the gmail forums, tried changing to various time-zones, still no luck.
I created my custom validator in one project, something like that:
[Code]....
he composite control in another project. I added a reference of the custom validator project to the composite control project. I have a textbox in a composite control and I would like to validate this textbox by the composite control I created. But how can I do that? How can I create the custom validator instance that is linked to the custom validator I created?
I'm trying to create a web server control with a css embedded in the assembly.
I marked it as an embedded resource, add assembly attribute to reference it and use the proper methods to include the link to that
css in html code... my page renders ok witk something like <link href='/WebResources.axd?....' />
That's when the problem appears! My control isn't using the css as it appears to not found webResources.axd
I tried directly in web browser to locate http://locahost/mysite/WebResources.axd and it came with http code 404 NOT FOUND
In my IIS i have uncheked "Verify if file exists" on my extensions mapping related to .axd I add HEAD verb in Web.Config to path WebResources.axd and the result is always the same
how to implement WCF username authentication with a custom validator in both client side and server side. I am trying this since last 2 days. but no result.
I've been trying to get a custom validator component working that ensures at least one checkbox from a checkboxlist has been checked. I've been used some code I found on dotnetjunkies.com but the client-side validation didn't work. I've been attempting to modify it to get the client-side javascript validation to work with no luck. Basically, I compile the below code into a DLL and add it to my bin folder.
I'm having a dumb problem that is killing me. I have created the simpelest custom server control in VS 2008 c# called MyMsgBox. On the ASP page I put it in and register it. But, in the .cs file, when I try to call one of its functions I get the compile error that it is not found. The funny thing is that intellesense has it in the list and all of the functions with their given arguements. At the top of the .cs file I am using the namespace. The code for the custom server control is in the App_Code folder. Also when I remove all refrences to its functions, the code compiles and when debugging the constructor for the class MyMsgBox gets hit.
this.msgBox1.confirm("Would You Like to add a new Task for this PO/Contract? ", "hid_f"); Error Message: 'Tasks' does not contain a definition for 'msgBox1' and no extension method 'msgBox1' accepting a first argument of type 'Tasks' could be found (are you missing a using directive or an assembly reference?)