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


Post New Web Links

System.net proxy configuration settings

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :.NET Framework
 

Hi there

I need to access external links from my application and i cant configure the proxy settings on my app.config.

My situation is this:

My machine is connected to a domain but im am logged to my machine with a local user(outside the domain).

My IE8 has the proxy settings configured and they require a username/password.

How can i tell my app to use the username\password required by the proxy to authenticate?

 

Thanx




View Complete Post


More Related Resource Links

Proxy Detection: Take the Burden Off Users with Automatic Configuration in .NET

  

Proxy settings can be a real pain in the neck and very frustrating for users to configure properly. In this article, Durgaprasad Gorti discusses how you can use automatic proxy configuration via script and how it works in the Microsoft .NET Framework 1.1 and 2.0.

Durgaprasad Gorti

MSDN Magazine August 2005


Best Practice for Windows Service "Settings" (Configuration) with .Net (C#) ???

  
Background:   I'm developing a Windows service using C# and .Net 3.5.  The behavior of the service should be controlled by some settings.  The settings will vary per host-computer but will not vary per user (which should be understandable since the settings control behavior of a service.)  A GUI panel of sorts must be provided to set-up and modify the settings that control the service behavior.Secondly, there is a "locally installed application" that has its own settings and those settings also vary per host-computer so all users of that computer would experience the same settings.  (Seemingly analogous maybe to a connection string but not a connection string.)Note that I do NOT perceive any need for Click-once support, web support, and so forth.  Translation:  I think I need the simplest darn type of settings support, the old "dinosaur" level of requirements not much more sophisticated than INI files used to be. I've researched using the "built-in" settings that make use of the Settings Visual Designer in VS 2008 and  System.Configuration.ApplicationSettingsBase.  It seems that: 1.  Application Settings cannot be changed at runtime.  MSFT documentation indicates the software must be shut down and settings must be modified by patching the XML with a text editor (notepad et al.)  The framework specifically prohibits application settings from being

Placing ..... configuration information in a config file other than app.config

  
Hi, I'm sorry if this question has been asked/answered before on this forum. I have searched both here and on the web in general, but to no avail as yet... I am running VS2010 and .Net 4, so in theory have all the latest versions of everything at my disposal. I have an executable a.exe. This downcalls into a dll b.dll. b.dll wants to send an MSMQ message using WCF. For cleanness (a.exe is a generic service and knows nothing about WCF) I want to define the client endpoint in b.dll.config. However I am finding that WCF is insisting that the information is held in a.exe.config. The exact problem is that when I create my proxy (i.e. the class which derives from ClientBase<T>), I get the message Could not find endpoint element with name 'XXX' and contract 'YYY' 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 name could be found in the client element. From what I have seen I have just described an extremely common problem that people have had with WCF over the years. My questions is basically to find out, given that I have WCF 4 at my disposal, whether there is now a standard approach to this scenario? Things I have tried so far: The obvious one...putting all my config info in a.exe.config. When I do this, everything works file, so I

Could not load type 'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtec

  
I have a windows service that runs on client machines and connects to a WCF service on a server.  This windows service seems to work fine on Windows XP, Vista and 7  machines, but when I try and run it on a Server 2008 R2 machine I get the following error: System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.serviceModel/bindings: Could not load type 'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement' from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (C:\Program Files (x86)\MyFolder\MyApp\MyAppWinSVC.exe.Config line 4) ---> System.TypeLoadException: Could not load type 'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement' from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.    at System.ServiceModel.Configuration.HttpTransportSecurityElement.get_Properties() I have the 3.5 sp1 feature installed. The only thing I have found online that is remotely similar is this MS hotfix: http://support.microsoft.com/kb/2262911 But when I try and apply it, it says that it isn't for my computer. Does anyone have any ideas how to resolve this issue?

SQL Server Reporting Services 2008 R2 - The configuration system has already been initialized

  
After correcting issues related to .NET 4.0, I am now encountering the error below. It occurs when I attempt to access one of the two web sites. I've been tracking my install/config progress here: http://serverfault.com/questions/178353/what-would-cause-a-500-internal-server-error-when-accessing-the-report-manager-ur   Error Log: appdomainmanager!DefaultDomain!ae8!09/07/2010-14:47:12:: i INFO: Appdomain:13 ReportServer_11-11-129283588326974843 started. appdomainmanager!DefaultDomain!ae8!09/07/2010-14:47:12:: e ERROR: AppDomain ReportServer_11 failed to start. Error: The configuration system has already been initialized. library!DefaultDomain!ae8!09/07/2010-14:47:12:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: Failed to create HTTP Runtime, Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportServer_11.  ---> System.InvalidOperationException: The configuration system has already been initialized.    at System.Configuration.ConfigurationManager.SetConfigurationSystem(IInternalConfigSystem configSystem, Boolean initComplete)    at System.Web.Configuration.HttpConfigurationSystem.EnsureInit(IConfigMapPath configMapPath, Boolean listenToFileChange

The configuration section 'system.web.extensions' cannot be read because it is missing a section d

  
My system: I have installed Windows 7, VS2010 and .NET40 and ASPAJAXExtSetup.msiI'm getting the error below. Error Summary HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032 Config Error The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration Config File \\?\C:\inetpub\tickets\web.config Requested URL http://www.tickets.com:80/ Physical Path Logon Method Not yet determined Logon User Not yet determined Config Source 45: </connectionStrings> 46: <system.web.extensions> 47: <scripting> My web.config:<?xml version="1.0"?><configuration>    <connectionStrings>            </connectionStrings>    <system.web.extensions>        <scripting>            <webServices>                <!--http://weblogs.asp.net/andrewfrederick/archive/2008/02/18/a-client-sid

How launched EXE use it's own configuration settings? (Reflection)

  

Hi All,

I am using reflection to run an EXE file from my application.

But the Launched EXE using the appsettings of my application.

How it'll use the configuration settings from EXE configuration file.

Thanks in advance.


cannot position the benefits of System.Configuration

  

I am horrified by the example code shown on this page:

http://msdn.microsoft.com/en-us/library/system.configuration.configurationsection.aspx

The class is over 100 lines long! Can somebody please explain to me how this is an improvement to working with ini files? I think it should not take this many lines to just read and write some stuff to a file...

 


global::System.Configuration.DefaultSettingValueAttribute ?

  

 

 

What does this mean

[global::System.Configuration.DefaultSettingValueAttribute("Data Source=servername;Initial Catalog=dbname;Persist Security Info=True;User ID=id")]


Help with permission settings for System.IO.File.Copy?

  

I have a vb.net 2010 program in ms vb express '10 for copying files from the root directory of the Documents folder to either an SD card in a reader or a flash stick but when I run it throws this exception: A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

Here is the underlying code:

 

Public Class Copyto
  Shadows Sub SdBackup()
    Dim Hdrive As String
    Hdrive = "H:"
    Dim Origin As String
    Origin = My.Settings.UserDocs
    System.IO.File.Copy(Origin, Hdrive)
  End Sub

  Sub FormLoad() Handles MyBase.Load
    My.Settings.UserDocs = My.Computer.FileSystem.SpecialDirectories.MyDocuments
  

Help with permission settings for System.IO.File.Copy?

  

I have a vb.net 2010 program in ms vb express '10 for copying files from the root directory of the Documents folder to either an SD card in a reader or a flash stick but when I run it throws this exception: A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll

Here is the underlying code:

Public Class Copyto
  Shadows Sub SdBackup()
    Dim Hdrive As String
    Hdrive = "H:"
    Dim Origin As String
    Origin = My.Settings.UserDocs
    System.IO.File.Copy(Origin, Hdrive)
  End Sub

  Sub FormLoad() Handles MyBase.Load
    My.Settings.UserDocs = My.Computer.FileSystem.SpecialDirectories.MyDocuments
  End<

First WCF Connection Slow and Proxy Settings in app.config file

  
Hi,

I'm new to the WCF and currently facing problems with my first connection to a service we created to connect an Excel OBA to SAP. The first connection is extremely slow, approximately 20 seconds, but once it is establish everything goes really quick afterwards. I've read through some posts and seems like the proxy settings could have an impact. I'm pasting the code of my app.config file below, can you please let me know how I should modify it to include proper proxy settings to improve the first connection?

Also, the proxy thing is just a guess, is there anything else I could do to improve this? Any hint would be appreciated.

Thanks a lot!
Martin

<?

<

</

<

</

xml version

Excluding Files From Different Configuration Settings

  

Hey dudes,

Does anyone know how I can exclude certain folders and files from certain builds? Essentially I've got test code that needs to be deployed to the testing server - but obviously not the real server. This is in both files and folders.

Using the configuration manager profiles, I would like to create a profile for each scenario, and tell it what files it does not need.

Cheers


Problem in reading WCF configuration settings

  

Hi,

The great thing about WCF is that you can configure you're WCF bindings in a configuration file and not through code.
We are now making connection to WCF's webservices in our SharePoint code, but now the question is where to place the WCF configuration settings. 

 

For deployment reasons we don't want to place the settings in the SharePoint web.config:

-  can't be easily changed by admin users through SharePoint Gui

-  new deployment needed to change configuration settings

-  webservices u

Analysis Services Project under VS2008 not honoring Configuration Settings ?

  
I have a solution with SSRS and SSAS projects in it. Since we have 3 different environments I use VS Configurations for the individual settings. In each of these environments different groups have access to these cubes. However if I deploy the project the roles on the instances are always overwritten by the settings defined in the project. And it seems it is not possible to have different role settings that for each VS configuration. Am I missing something, it should somehow be possible to use the VS configurations to have different permissions per deployment environment?!

Backup SharePoint 2010 farm configuration settings only get an error for not enough disk space when

  

Hello

I am trying to do a backup the Backup using the Backup and Restore feature in SharePoint 2010 Central Administration.  I just want to backup only the farm configuration settings only.

so I followed the GUI 

Open CA Backup and Restore, checked the Farm checkbox,  click Next 

I chose the following:

Backup Type :  Full

Data to backup:  Back up only configuration settings

Backup File location  :   use an UNC shared location   \\servername\sharedname

at this point,  I see the Estimated disk space required is:   1.2 GB 

the server hard disk available space is  30 GB

but when i click the Start Backup,  i got an error in RED saying "There is not enough disk space. Free additional space on your hard disk and then try again. Approximate amount of space needed is 40 GB.   Amount of space free on disk:  30 GB."

Why is this happened?  and the estimated disk spaced required still showed at 1.2GB

If anyone had experience this problem and have a solution, please advice

Thanks

Swanl

 

 

 

 

 

&nbs

SharePoint 2010 Service Application Proxy & My Site Settings

  

I have a SharePoint 2010 Site Configured with Claims based FBA. I have also made My Site work with FBA.

My question is:

In 2007 I would create a seperate SSP for FBA based my site and Set all configuration there. As SharePoint 2010 supports Service Application Proxy how can I isolate FBA based My site and Other AD sites.

While I was able to select the required services for my Site using Configure service application associations link in Central admin, all changes I make in My Site Settings reflect for both FBA & AD based application.

How do I isolate My Site changes ?? I wanted to have different configuration for each of the My Sites


Categories: 
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