Web Forms :: How To Configure Multiple Sitemaps In Web.config
Feb 21, 2011
use multiple sitemaps by roles in asp.net, how do i configure multiple sitemaps in web.config and how to provide sitemap path when user logs in.
e.g: if customer logs then it should take path of Cust.Sitemap, if Admin logs then it should take path of Admin.Sitemap
View 4 Replies
Similar Messages:
Jun 22, 2010
I am having some trouble adding an extra sitemap to my website. I have the main sitemap for the general navigation of the whole site, but would like to add a new sitemap for the navigation in the community area once people have logged in.
In the web config file I have tried both:
<siteMap defaultProvider="AspNetXmlSiteMapProvider">
<providers>
<add siteMapFile="Community.sitemap" name="CommunitySiteMapProvider"
type="System.Web.XmlSiteMapProvider" />
</providers>
</siteMap>
[Code]....
However the menu that shows is the default Web.sitemap
View 2 Replies
Jun 16, 2010
I have two Master Pages, each with a SiteMapPath control that uses a separate sitemap assigned in markup via the SiteMapFile attribute. Both sitemap files are defined as providers in web.config, and sitemap "A" is set as default. My master pages are dynamically assigned to common content pages (in the Page_PreInit event).
View 3 Replies
Sep 15, 2010
So i have the global.asx file that I want to call a piece of code when the session end. How do I configure web.config so that when the session is end/times out it goes to that global.asx sessioN_end function?
View 8 Replies
Dec 28, 2010
In my ASP.NET web application,I used NHibernate.dll and configuration is read from the Web.config file as follows.
At Web.config
<httpModules>
<add name="CurrentSessionModule" type="Globals.CurrentSessionModule, Globals"/>
</httpModules>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.connection_string">Server=localhost;initial catalog=TESTDB;Integrated Security=SSPI</property>
<property name="current_session_context_class">web</property>
<property name="default_schema">dbo</property>
<mapping assembly="LAT.Domain"/>
</session-factory>
</hibernate-configuration>
At CurrentSessionModule.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using DataAccess;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Context;
namespace Globals
{
public class CurrentSessionModule : IHttpModule
{
public void Dispose()
{
}
public void Init(HttpApplication context)
{
context.BeginRequest += delegate
{
string session = Global.SessionFactory.OpenSession();
CurrentSessionContext.Bind(session);
};
context.EndRequest += delegate
{
CurrentSessionContext.Unbind(Global.SessionFactory);
};
}
I reference this website( [URL....
but the main different between my project and the ref website is Global.asax
my Global.asax
[Code]....
View 1 Replies
Jan 25, 2011
accessed only using IE 6.0 or above. If anyone tries to access the website using any other browser I want to display a big warning message. Is it possible to configure this in web.config insted of checking via javascript. I am assuming something like in authentication we have customErrors attribute were we can set the custome error page in case of failure to authenticate the user.
View 2 Replies
Jul 6, 2010
What changes are required in web.config file to configure Web Farm ?
View 1 Replies
Dec 9, 2010
I created a file browser control which open files on client machine itself, so I don't need to bother about file path
from my application I am not able to redirect page to [URL] it works for how can I configure my application to support file handler.
View 2 Replies
Oct 21, 2010
I need it for the test purposes.. (don't want to see „The remote certificate is invalid..." Exception.. )
View 3 Replies
Mar 31, 2010
How to configure BasicHttpBinding without any entry in web.config file I think subject is good enough :)
View 4 Replies
Apr 24, 2010
where i can learn how to make sitemaps..
View 2 Replies
Feb 10, 2011
I was looking in the tutorial at: [URL]
The example is created with a site.master.
I do not have a site.master, but a _Layout.cshtml. How do I place the <%= Html.Menu() %> on that _Layout and include the htmlhelpers?
View 4 Replies
Mar 30, 2011
I'm very new to ASP.net, so I'm just figuring this out.First off, I have multiple separate projects that will be hosted on the same server.Second, they must be able to share certain settings (like connection string, configuration options, etc).Third, those shared settings must be configurable for different deployments (test, prod, etc).
View 1 Replies
Feb 18, 2011
Possible Duplicate:
How to apply the asp.net authorization in two different folders ?
How to use the multiple login for multiple folders ?
i have two different login pags in folders ADMIn and VEndors ...i want when any of the user directly access any of the page inside admin folder then it redirect to login page of Admin folder ......and if any of the user directly access any of the page inside Vendors folder then it redirect to login page of Vendors folder ......
View 1 Replies
Dec 29, 2010
I can't send out multiple "TO" emails
here is the code
<add key="PortalEmailBroadcastAddress" value="email.com" />
heres an example
<add key="PortalEmailBroadcastAddress" value="email.com,email2.com" />
[URL] is only the email address able to receive it.
View 2 Replies
Dec 20, 2010
how to use multiple web config in a application?
for example i have two web config in a application.when we display the first page we have to get the connstring from first web config.then we display the second page we have to get the connstring from second web config.
View 4 Replies
Feb 4, 2011
Is it possible to use multiple authorization elements in a single web.config to allow additional users access to one file?
E.g., I would like to allow User1 access to the whole application (including Page1.aspx), and User2 access to only Page1.aspx:
[code]....
View 2 Replies
Apr 1, 2011
I know this question is asked (and answered) a lot already, but I believe my situation is unique.
We are using the ASP.NET SqlMembershipProvider. However, we also have some less-secure content we would like to secure by adding users directly to the web.config, like so...
<forms loginUrl="login.aspx" defaultUrl="default.aspx">
<credentials passwordFormat="Clear">
<user name="user1" password="123" />
<user name="user2" password="456" />
</credentials>
</forms>
Is it possible to use this method alongside a SQL Membership Provider? If so, how?
I know it's bad practice to do this. This is only a stepping stone as we move parts of our website into the asp.net application. We would like some of those password to be easily editable without going to the database.
View 2 Replies
Nov 16, 2010
I have two webconfig files, on in the root directory and one in the other directory. I dont know how to access or specify for the particular pages or APIs those are in the folder.Root webconfig file used by another section and the 2nd one accessed by another api. I have no idea about that
View 3 Replies
May 12, 2010
I'm trying to use ConfigurationManager.AppSettings.GetValues() to retrieve multiple configuration values for a single key, but I'm always receiving an array of only the last value. My appsettings.config looks like
<add key="mykey" value="A"/>
<add key="mykey" value="B"/>
<add key="mykey" value="C"/>
etValues("mykey");
View 4 Replies
Apr 29, 2010
Is it possible to specify that multiple roles are required inside the authorization element of the web.config file? I currently have this block in one web.config of my site for a specific directory:
<authorization>
<allow roles="Global, Region" />
<deny users="*" />
</authorization>
I've just identified a special case where a person with two lower-level permissions than Global and Region should also have access to this directory. Roughly, I want something like this:
<authorization>
<allow roles="GlobalManager, RegionManager, SiteManager && FooSite" />
<deny users="*" />
</authorization>
I realize I probably should have a new role for this scenario, but I'd like to avoid that.
View 1 Replies
Jun 4, 2010
I have 3 web.configs and 1 web project. I compile it once, and when deploy it, all I do is copy the correct web.config to the correct directory.
This is too complicate to maintain, when I have web.config change I must change all the three.
So, what I want is to keep only one web.config file, for all three websites.
In order of doing so, I have created a new settings.xml file, and I wish to read everything from there instead of te web.config file.
to my questions:
1. I need to remove ConnectionString from web.config to the settings.xml file. How do I change the providers connection string programatically?
[Code]....
Seems like moving the connection string to a different file might be a difficult task:)
2. How programatically can I do what I did on the web.config easily:
[Code]....
View 6 Replies
Apr 2, 2011
can i use common web.config across multiple projects
suppose say i have one web and one wcf service both are using same data base
then if change database the i need to make changes in both config files
or i have some common keys and values
is it there any we to common out the things in to one config file and that can be shared by multiple projects
View 1 Replies
Apr 8, 2010
I am using a Network Solutions (NS) shared hosting account. When adding two domain names to my NS account I originally had my entire hosting folder "/htdoc/" assigned to my first domain. I was instructed by customer service to create a new sub folder for each domain and assign the domain names to each one using my NS account manager. Each website is its own application with vastly different settings At this point my directory looked like this:
/htdocs/website1/
/htdocs/website2/
/htdocs/website3/
I then got this error:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS
Naturally I called NS assuming that all they need to do was change a setting so that each sub folder would serve as the main directory for each site. Instead I was told that I need to configure /htdocs/ as its own application with a special web.config file configured to handle this in some way. Of course my next question was how do I configure the web.config to solve this problem and instead of answering the question they said that the question was outside the scope of their customer support.
What I need is simple. Code to add to a web.config with default settings in the /htdocs/ directory that specifies the sub directories as the parent directories for those websites and that no setting in any specifec site should have an effect on any others.
View 3 Replies
Nov 15, 2010
I am attempting to setup Config Transforms on my project that I migrated to VS 2010. The web project works just fine, but I have a WCF Host project that I seem to be unable to add transforms.
Has anyone had this problem before?
View 1 Replies