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

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

HttpWebRequest default behavior wrt proxies

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :.NET Framework
Does the HttpWebRequest class perform any automatic proxy handling?  In other words, if an application doesn't explicitly provide proxy settings via the Proxy property or via an application .config file, what is .NET's default behavior with respect to proxies?  For example, does .NET make any attempt on its own to obtain settings from IE/default browser, or autoproxy mechanisms (i.e., PAC, WPAD)?

View Complete Post

More Related Resource Links

override wpf button default behavior - blinking on focus


How do you override the default blinking on a wpf button that has focus or on mouseover etc? I tried turning off all default behavior with 

<Setter.Property="FocusVisualStyle" Value"{x:Null}" /> and various other style settings, but nothing seems to work.




Default ASP.NET Architecture

In providing an architectural approach, some assumptions are made concerning the project goals. These assumptions should be used as a litmus test to determine if the described architecture may be an appropriate fit for your ASP.NET application.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

default constructor SelectList




dont have a  default constructor

new SelectList() :(

Run Button Behavior: Suggestion/Bug


Note: This could be a bug or considered as suggestion. I am not looking for solution.

1: I have ImageWatermark.cshtml open and currently in focus.

2: I have Photo1.jpg selected in left Files workspace.

3: Now if I Click "Run", instead of opening ImageWatermark.cshtml it trys to open Photo1.jpg and it fails.

So ideally I would expect the "open file (ImageWatermark.cshtml) to run rather than running the selection from Workspace.

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



Default page for my Forlder(product)?


Hai all,

         I need to show the URL like this http://www.saffronrouge.com/face/moisturizers

for me  http://www.mysite.com/products/

i need to list all the products. please help me on this.

Setting default localization



I ever thought that I can set a default localization if the users one (which is set in the browser) isn't available.

I've implemented my localresource files for localization. The start.aspx.resx contains all texts and elements for German use and the start.aspx.en.resx for English users. When I switch the language in the browser settings from German to English everything works fine and the english text is displayed. But when I switch to an other language which is not German or English, it takes defaulty the german resource files.

I've set

UICulture="auto:en-US" Culture="auto:en-US"

as well, but it didn't assume the .en resource file automatically. (For example when I enter the website and switch the browser language to French or Italian it should take the english resource files.)

Thanks and regards,

Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap



I created 2 projects in my solution:

  1. Classic asp.net web service (asmx)
  2. Class library project which references service
  3. web site project which references class library project
  4. Windows app project which references service.

Both projects were created in 3.5 framework and in Visual Studio 2008 Beta 2.

I added web service reference to Class library project. When it asked for namespace I typed "CurrencyProxy". Projects build ok, but when I run web app, Class library throws an error: Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I believe it has something to do with app.config in Class library project. Here is part from app.config:

<binding name="CurrencyServiceSoap" closeTimeout=



Ive 'inherited' some code that creates a HttpWebRequest object to consume a webservice and am working through it to figure out what each bit does.  Ive never consumed webservices this way before (I always create a webreference) so this way of working is new to me.  I can follow all of it except for one bit.  Heres the code Im having trouble understanding

ASCIIEncoding encoding = new ASCIIEncoding();
byte[] bytesToWrite = encoding.GetBytes("The message here");

// create web request
const string Action = "http://Awebaddress.org/AProcess"; 
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("The web service url here");

const string contentType = "text/xml; charset=utf-8";
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = contentType;
httpWebRequest.Timeout = -1;
httpWebRequest.ContentLength = bytesToWrite.Length;

the line im having trouble with is this one

Word Automation - Multiple DCOM Errors/Behavior

Before I get started, I already know that Microsoft does not support and highly discourages server-based MS Office automation.  I've read a multitude of posts and smarmy "*wink*, here's a link" replies, so I'm looking for actual help here, not condescending reprimands.

That notwithstanding, here is my problem.  I have developed a simple method that will open a local Word document, modify some header information, and then save the document as a new file.  As expected, it works great as a console/windows app, but as soon as I went to ASP.NET, DCOM jacked my world up when accessing the app remotely from a different domain account (that has access to the ASP.NET app.  For reference, my method is shown below:


1    public static string ModifyAndSaveBuildDocument(string localFilePath, BuildDocumentType docType, string buildNumber, DateTime buildDate, string projectName)
2            {
3                try
4                {
5                    ProjectConfiguration config = (ProjectConfiguration)ConfigurationManager.GetSection("ProjectConfiguration");

default.browser from asp.net 3.5 to asp.net 4.0


hello, it's me again :-)

a (maybe) stupid question:

in asp.net 3.5 i've this .browser file:


<browser refID="safari1plus">


<adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />





now i suppose that in asp.net 4.0 this is not useful.

So what i've to do? I've simply to delete "App_Browsers" folder in my converted project or i've to put in this folder:














What's the best way?

Thank  you very much!

ModalPopup/UpdatePanel from codebehind, inconsistent behavior onClick


First post bear with me please:

I have a simple form with a list of linkbuttons, each fires the same onclick event which sets an indicator image.  I have a dummy button with style="display:none" which I have set as the TargetControlID of the modal.

onClick event from the imagebutton, the modal is shown via modal.Show().  The cancel button inside the modalpopup fires an event which turns off the indicator image and hides the modal via modal.Hide(). 

The events fire perfectly, it's very simple!  Although after doing some testing I noticed the modalpopup is not presented after the 6-10th cycle of clicking the open event, then clicking cancel.  The grey background appears but it is behind the main panel and the modal is either presented behind this or is just simply not displaying. 

I spent hours researching various methods, implemented the CancelControlID to see if it was somehow tied to my call of modal.Hide() that fails.

This occurs with an updatepanel only.  The behaviour is much cleaner this way, so I would hope to be able to implement this.  I have basically eliminated everything but these two events!  Please help

how to change default menu tab in master pages?



i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?


Accounts in Default Template


Hi,  I'm trying to learn in the VS 2010 Express. Using the default template for ASP.Net Website. It starts the web application with an accounts folder. I'm trying to extend the "registration" or "AddUser" utilities. What I'd like to do is modify the registration by adding additional elements (i.e., address, city, ST, zip, etc.). I know I can open the database and modify the Users table and also modify the stored procedure for CreateUser.

My question is:  I don't see any reference in the page code (here's a reprint of the register.aspx.vb) that calls the procedure, or even passes in the variables from the textbox entries from the page. I must be missing something. Can someone clue me how to drill into this template to find the elements like how it communicates with the database. There are a few JQuery files. I am not yet very familiar with JQuery. Is that where I need to look? Thanks for any advice...

Public Class Register
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        RegisterUser.ContinueDestinationPageUrl = Request.QueryString("ReturnUrl")
    End Sub

    Protected Sub RegisterUser_CreatedUser(ByVal sender As Object, ByVal e As EventArgs) Handles RegisterUser.CreatedUser
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