.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Connect to proxy server

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :Windows Application
Hi guys, How do I connect to the proxy server using the code on below?   Public Function ProxyServer(ByVal URL As String, Optional ByVal UseProxy As Boolean = False, Optional ByVal ProxyAddress As String = "", Optional ByVal ProxyPort As Integer = 0, Optional ByVal UserName As String = "", Optional ByVal PassWord As String = "", Optional ByVal Domain As String = "") As String Dim sResult As String = "" Try Dim objResponse As WebResponse Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(URL) If Not UseProxy Then Dim oProxy As New WebProxy(Address, Port) If Domain <> "" Then oProxy.Credentials = New NetworkCredential(UserName, PassWord, Domain) Else oProxy.Credentials = New NetworkCredential(UserName, PassWord) End If objRequest.Proxy = oProxy End If objRequest.Method = "GET" objRequest.Timeout = 120000 ' 20 sec. objResponse = objRequest.GetResponse Dim sr As System.IO.StreamReader = New System.IO.StreamReader(objResponse.GetResponseStream(), System.Text.Encoding.UTF7) sResult = sr.ReadToEnd() sr.Close() ' when code-execution has reached this point without ' throwing an error, the html page is loaded which ' means all is o.k.

View Complete Post

More Related Resource Links

deploying to msdeploy does not support a proxy server


I am trying to deploy through webmatrix but my system Proxy server configuration is not being used. I assume that webmatrix would detect the proxy server settings and use that for the msdeploy calls under the hood. Can anyone confirm this is a know issue? 

need help about "Unable to connect to remote server." using HttpWebRequest


Hello friends 
I am creating an application where I want to store an html page from one of my websites into another web site. 
For the same purpose I am taking the url of the html pages 
for example if I want to copy this page "http://mydomain.com/html/page1.html" then i take this url from a text box which user enters.

How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\SQLEXPRESS. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Proxy failed to create remote object on the server

Hi, I am using .net remoting for inter-process communication between two processes on the same machine 1.   The first process is one of the Office application: Ecxel /   Word /   PP 2.   The other process is another application that interacts with one of the above. For that it needs office application object. For example: Excel The solution is comprised with 3 projects: Project #1: The remote object is a simple Called RemoteOfficeApplication – that simply wraps the required application object (Word / Excel / PP).   Project #2: The Server is a simple Office add-in, written with a Visual Studio Extensibility -> Shared project. This add-in is instantiated whenever Excel is lunched. This project reference project #1. Code: var channel = new TcpChannel (5003); ChannelServices.RegisterChannel(channel,true ); RemotingConfiguration.RegisterWellKnownServiceType( typeof (RemoteOfficeApplication.RemoteOfficeApplication ), “AppObj”, WellKnownObjectMode .Singleton);   Project #3: The Client is the process that requires the application object. This project also reference project #1. Code:   //Get Remote object proxy object remoteAppObject = Activator.GetObject(typeof(RemoteOfficeApplication.RemoteOfficeApplication), “tcp://localhost:5003/AppObj" ); //Cast the proxy var r

sqlcmd, cannot connect to server

I have SQL Server installed on a machine called SQLDEV. I log on to that machine and I run the command sqlcmd -s SQLDEV -Q "select * from <db>.<schema>.<some_table> -E This command works and returns a result set.   Next, I go to a different machine. On that machine I can use SQL Mgmt Studio to log on to SQLDEV using window authentication. However, if I run the same command as above, I get some kind of a connection error. The error says, ".... When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections .....   Any suggestions/ideas why I am getting this error?

Unable to Connect to server

I have install sql server 2008 on window 7. But connection to server is failed. These are the options. Sever Type Server Name. Authentication. Login. Pasword. anybody have answer my question????

Cannot connect Visio 2007 to SQL Server CE 3.5 database?

I am trying to reverse engineer a database (running under SQL Server CE 3.5 SP1) with Visio 2007 Professional.  I may be being blind, but I can find not way for Visio to do this.  Am I missing something or just piddling into the wind? Fully patched Vista. Thanks, Ed Bessant  

Can't connect to SQL 2005 Enterprise using Management Studio with Server Name (only (local) works

This is a test system, everything running locally & no domains. Win 2003 Ent. Server & SQL Server 2005 Enterprise. I can't log into SQL Server Management Studio using the server name & using either Windows Authentication or SQL login. If I change the name of the server in the drop-down list to "(local)", I connect just fine (both Windows & SQL security modes). Shared Memory, Named Pipes & TCP/IP enabled in both server & client. Remote connections allowed. I have IP adresses (both & external IP) in my hosts file pointing to the server name. Does SQL require a DNS server? This wouldn't be a problem except for the fact that I can't install SQL 2005 SP3 due to authentication failure since there's no way to enter (local) as the server name. SQL tools (management studio, SP install) seem to see the SQL server running but won't authenticate the user through any means other than setting server name to (local). This is driving me crazy!!!

Unable to connect to the ASP.NET Development Server

 I have VS 2008 with SP1 installed on Win XP. I have .NET 3.5 with SP1 installed When I ran and opened an existing project for the first time, I got the below error WebDev.WebServer.exe has encountered a problem and needs to close. After this error, I continusly get  "Unable to connect to the ASP.NET Development Server." whenever I run the website. I checked the internet and ASP.NET forum and tried all the following Making port numbers auto assign Making it to a specific port number using the Custom web server Tried creating new web site and checking Replaced WebDev.WebServer.EXE after downloading it from a website My anti virus have not blocked any websites as such I tried resetting VS settings by running devenv /resetsettings Can any one help me, what else might be the problem? Thanks in advance

Unable to connect to SQL Server 2005 remotly, all client protocols are blank

I have an installation of SQL 2005 and had issues connecting remotly. Looking at the client protocolols, they are all blank. I can see that TCPIP, Named Pipes, VIA, etc. are 'enabled', but where the words 'TCPIP', 'Names Pipes', etc. should be, it's just blank. I tried to install SQL 2008R hoping the Client Protocols would be corrected during the installaion, but they were not. I'm assuming the issue with the Client Protocols not showing up is a symptom of the problem. Does anyone have any ideas? Thanks!

Reporting Services Add-In for MOSS2007 : Unable to connect to the database Error at "Set Server Defa

Dear Expert, I've succesfully install the Add-In + configure the reporting services (integrated mode) + activate the features on my MOSS2007. As we know by activating this at my Central Admin, i'm able to see "Reporting Services" under my Application Management as below:   1) Manage Integration Setting   ---> My report url : http://servername:808/ReportServer (Trusted Account) 2) Grand Database Access --->  My setting : <servername> with default instance  3) Set Server Defaults ---> Area that i receive an error "Unable to connect to database" Anybody here have a same experience? please assist me, Thanks in Advanced My Note: OS : Windows Server 2008 Enterprise x64bit (SP2) SQL : SQL 2005 with latest Service Pack (SP3)  My Error Log: <Header>   <Product>Microsoft SQL Server Reporting Services Version 9.00.4035.00</Product>   <Locale>en-US</Locale>   <TimeZone>Malay Peninsula Standard Time</TimeZone>   <Path>c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__08_04_2010_10_51_59.log</Path>   <SystemName>SEINE</SystemName>   <OSName>Microsoft Windows NT 6.0.6002 Service Pack 2</OSName>   <OSVersion>6.0.6002.131072</OS

Why can I not connect to SQL Server Database?

Can somebody PLEASE try and assist me with this issue - it's been driving me insane for 2 weeks and I am seriously at the end of my tether now... I'm attempting to use ASP.NET Configuration from the Website Menu of Visual Web Developer 2010 Express. (Note: I have downloaded SQL Server 2008 & SQL Server 2008 R2 with VWD 2010 Express via Web Platform Installer.) I'm selecting 'select a single provider for all site management data' followed by; 'AspNetSQLProvider' but every time I try and click 'test' I get the following error message:   Could not establish a connection to the database.  If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. After the scouring the 'net for literally tens of hours, I've found several forums that I thought would help, such as; * Re-installing SQL Server and copying the .exe file to the desktop to get the SQL Server to be able to be installed properly (which I've done and it seemed to install successfully), BUT even after doing this I keep getting the error as underlined above & * Finding the aspnet_regsql file and installing it via it's wizard I've tried doing the above on both my 32-bit Windows XP laptop AND my 64-bit Windows 7 laptop - b

"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied error for a sched

Hi Guys, The subject of this question is the error which I am receiving when running a scheduled job also this is an error which we get at a random intervals and the frequency would be once or twice in a month. I have been through several posts and didn't concluded anything out of it. At the time when we receive this error the memory usage of the database was normal with free resources available and also the network was stable without issues. Our Sql database is in cluster mode with named instance. Can anyone share some information on this, I know this is not the right forum with the error message I have posted but am sure some one might have face the same problem when running some ETL jobs. Source and target both are sql server and the error message is generated in the validation phase of the connection manager connecting to target database. SSIS 2005 SP2 64 bit environmentRaju

Can not connect to my SQL server from the publish server

I have created a simple website, Iam connecting to a database the is not located in local-newtwork. Connection from development machine works fine, The problem occurs when I publish the website on my server, than it can not connect to the server, Iam pinging the server I no packets are lost, I don't why it can not connect to the database server?

Why can't I connect to SQL Server using VPC?

Hi, I have 2 VPC, installed with Windows XP Proffessional SP3. lets say, computer A and computer B. on computer A, i installed SQL Server 2005. i can ping computer A from B, and so forth. but why i can't connect to the SQL Server from computer B? is there any added settings?   thanks! AddinAddinGanteng

Cannot connect to FAST Search server

From the ULS: Failed to connect to myfastserver.mydomain.com:13391 sp. Error=Failed to initialize session with document engine: Unable to resolve Contentdistributor  [documentsubmitterworkerthread.cpp:132]  d:\office\source\search\native\gather\plugins\contentpi\documentsubmitterworkerthread.cpp Docpush -c sp myfile.txt works fine. And I can do a search from FAST search center and find the new file. Q1: How do I determine if SSL is working correctly between my SP Server and my FAST Search Server? Q2: The FAST Search server has port 13391 open. Does this port also need to be opened on the SP Server or are all communications (crawling etc) made over port 443? Q3: Why does the error refer to d:\office... when this the DVD drive (place FAST was installed from)

Can not connect to user instance of SQL Server 2008 Express with Advance Services in Visual Studio 2

I used SQL Server 2008 Express with Advanced Services (not SQL Server 2008 Express) in Visual Studio 2010 because it is the fast and easy way to developed and managed data-driven applications with powerful built-in reporting and full-text search functionality. I received Sql Server 2008 Service Pack 1 with Windows Update. It's ok if I connect to instance of SQL Server 2008 Express with Advance Services (with SP1) through SQL Server Management, but if I try to attach a database in Server Explorer (Visual Studio 2010), I get the following error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." I'm stuck at this point. Is there a fix or a workaround? I've already tried deleting the 'C:\Users\Administrtor\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS' directory as mentioned in other posts, with no luck. The error.log at 'C:\Users\Administrator\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log' has the following relevant entries: 2010-09-01 14:44:10.47 Server      Error: 17156, Severity: 16, State: 1. 2010-09-01 14:44:10.47 Server      initeventlog: Could not initiate the EventLog Service for the key '3677F6D3-17C7-4F', last error code is 2. 2010-09-01 14:44:10.47 Server &
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend