Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Which Web.config?

  Asked By: Madeline    Date: Mar 26    Category: Sharepoint    Views: 1153

I am trying to create a Web part for WSS. I need to register it
as "safe" which, as I read somewhere, should be done by adding a record
in the Web.config file for the site. The problem is I cannot find the
proper file or I am not sure about it. I read that it should be
in "C:\Inetpub\wwwroot\wss\VirtualDirectories\%sitename%\web.config"
but my wwwroot doesn't have any wss directory.

When I create a new site in Sharepoint, where do I find the
corresponding web.config file? I registered the new Web part in the
web.config file at the root level of the site (the only one I found)
but the webpart doesn't appear when I try to incorporate it to the site



3 Answers Found

Answer #1    Answered By: Kedar Phule     Answered On: Mar 26

Depending on how you set up the site. The web.config file  for the
site is in the root  of the IIS Home Directory. So if you set the
root directory  for the site  to c:\inetpub\wwwroot\ then the web
config is c:\inetpub\wwwroot\web.config.

Answer #2    Answered By: Chanel Gaines     Answered On: Mar 26

In IIS Manager, right-click on your web  application (virtual server) and select
Properties. Click on the Home directory  tab. The Local Path: is defined there.
Your web.config should be in the root  of that directory.

Answer #3    Answered By: Timmy Whitney     Answered On: Mar 26

I already solved that issue. I discovered that it was MOSS installed (someone
else did it), the file  to use was the one on the root  dir and the WP didn't load
due to something else. I am new to this and I had dificulties to understand what
MOSS realy was. Now I see that (at least in the configuration I have) the MOSS
sobstitutes (or runs as) the default site  so the file was

The generic message when a WP does not load says that "it is not registered  on
this site as safe" and my problem  was to configure IIS to run on framework 2.0
instead of 1.1. It would be good to have a more explicit indication.

I finally managed to get my sample Web Part running. Now I want it to be more
flexible, so I need to put some values in the Web.config so that the WP can read
them from there. How do I do this? Is there any article that I could read  to
find out?

Didn't find what you were looking for? Find more on Which Web.config? Or get search suggestion and latest updates.