
Here is a sample subscription for you. Click here to start your FREE subscription
- "This collection already contains an address with scheme http. There can be at most one address per scheme in this collection"
- Setting the default browser in visual studio
- Theme not being applied for a certain page
- Forcing a Refresh from JavaScript
- Debugging a windows service
- More Recent Articles
- Search C# Guild (csharp)
If you are using a third party host like discountasp.net and you are trying to host a wcf service
within your web application and you get this error message:
"This collection already contains an address with scheme http. There can be at most one address per scheme in this collection"
you will need to add the following web.config key:
<servicehostingenvironment>
<baseaddressprefixfilters>
<add prefix="httplinktoyoursite">
</baseaddressprefixfilters>
</servicehostingenvironment>
If you have any tips, tricks or resources you would like to share with the group please email them to Susan Fischer at susan@clinchportal.com

I keep forgetting how to do this and alway have to search for it so I thought I would post the answer here.
Step 1: Open any .aspx file
Step 2: From the File menu choose Browse With:
Step 3: Select the browser from the list and choose set as default.
Voila that is all. Thanks Steve for the answer.
http://stevenharman.net/blog/archive/2007/08/02/setting-a-default-browser-for-visual-studio.aspx

Scenario: You put the default theme in the web.config. You check the theme value all the way through the event chain and its value is correct but the css references never make it to your page.
Solution: You probably overrode the Page.OnInit event and did not call the base.
NOTE: If your page derives from a base page be sure to check if it is overriding properly by calling base.OnInit(e)
The Page.OnInit method does the following
protected internal override void OnInit(EventArgs e)
{
base.OnInit(e);
if (this._theme != null)
{
this._theme.SetStyleSheet();
}
if (this._styleSheet != null)
{
this._styleSheet.SetStyleSheet();
}
}
Obviously by not calling the base.OnInit method on my derived Page class would ignore the inclusion of theme files.
The original answer was found here: http://forums.asp.net/t/1028417.aspx
If you have any tips, tricks or resources you would like to share with the group please email them to chrisw_88@hotmail.com or susan@clinchportal.com and we will add them here.

I found a good article on how to do this check it out at this link:
http://devel.lubong.com/2007/06/24/javascript-how-to-force-page-to-reload/
They are using the window.location.reload(true); much like I am in my code.
However I did not realize why we use true instead of false. but he explains it so well:
The reload method accepts a boolean value, which, when it is true, causes the page to always fetch document from the server. When none is specified, it defaults to false, which may reload the page from its cache.
The issue I am having and if any of you know the answer is that in firefox on the second call to this I get a popup that says:
To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
If you have any ideas on why please post them to this blog posting.

It took me a while to find this again. If you place this line of code in your onstart event then it will launch the prompt to debug and you can run your service in visual studio.
System.Diagnostics.Debugger.Break()
Hope this helps you as well.
If you have any tips tricks, resources you would like to share with the group please email them to Susan Fischer at susan@clinchportal.com

More Recent Articles