I made 2 usercontrols for sharepoint 2007 site. Everything is working fine on test server. I deployed it on production but only 1 got deployed and placed properly. The second user control is added n deployed to web part galleries but gives File not found error when i add it on web part page. I deployed it using WSP. yet it gives this error. I checked logs it did not show anything. I have no idea what to do. please help. If more details are required I am ready to share but please help me
![Error which I get] http://i.stack.imgur.com/jOjwb.jpg
WSP will deploy according to your requirements. You could build your WSPs automatically using WSPBuilder http://wspbuilder.codeplex.com/
You should not deploy the user controls to web part galleries. The user controls should be deployed to CONTROLTEMPLATES so modify your WSP accordingly.
You could use the SmartPart to show any controls you developed.
http://smartpart.codeplex.com/
Related
During my previous projects, any change that I would make to an aspx.cs didnt require building the entire solution. The changes would directly reflect in my IIS hosted server i.e in localhost.
the new web application has the same setup configured. The application has been added in IIS with a designated Application pool and when browsed the site opens. But in this project, I have to build the solution everytime I make change in aspx.cs page. The same doesn't apply to aspx changes.
Any help would be appreciated in letting know this difference in behaviour and solution of not building the entire solution if possible.
Thanks
I have just completed my website and I started working with IIS it works fine when I put all my file without published. I copy the whole website to wwwroot inside my folder as I said It works fine but when I tried to work without code behind page it didn't work I published website from VS. and I copy my published file to the same folder but it doesn't work.
I received this error:
Eval is not declared. It may be inaccessible due to its protection level.
I don't want to put my code behind page. How can I run my published pages?
First, when you publish your web project, their are no code behind pages.
Do this, set a directory and publish your site in it.
Now cmd-> intemgr->
site-> -> add web site->
give site name and select an application pool, then set the physical path to the directory where your application is published, if necessary change the port to something like 50 because 80 is a standard port for http. Hit ok. Your site is ready.
Please check in application pool that your application pool is set to .Net framework version V4.0 (i mean the version compatible to your app ).
just click to browser the site, please do check the uri you can see the port number also
I have website in VS2008. Created the Virtual directory in IIS 5.1. When I try and run the site to debug from Visual Studio I keep on getting:
Your Web service is now running.
You do not currently have a default Web page established for your users. Any users attempting to connect to your Web site from another machine are currently receiving an Under Construction page. Your Web server lists the following files as possible default Web pages: default.htm,default.asp,index.htm,iisstart.asp. Currently, only iisstart.asp exists.
To add documents to your default Web site, save files in c:\inetpub\wwwroot.
I have no idea why this is happening.
Can anyone help me?
If I understand correctly, it may be as simple as this:
In Solution Explorer, right-click on the page you want to be the default page and click "Set as Start Page".
What I have?
I have a ASP.NET page deployed in layouts folder of 12 hive in SharePoint. This page makes use of Accordion control in AjaxControlToolkit.dll V3.5.40412.2.
I have placed the page code behind class assembly and AjaxControlToolkit.dll in Virtual Directory bin folder.
What I want?
I want to load this page when a link clicked from a web part for users of "Visitors" site group when the DLLs are placed in virtual directory bin folder.
What problem am I facing?
The page loads properly for administrator. But, for "Visitors", it shows "The website declined to show this webpage" error message.
In these scenarios the page works fine for "Visitors":
If I place both the assemblies in GAC
If I give Everyone read permission to AjaxControlToolkit.dll (in bin)
Am I missing something here?
Update: One strange thing I noticed was I removed everyone read access to the DLL and given one of the users in "Visitors" group read permission to the DLL. Then, I tried to login with that user and it works fine for him. But, now, it is working for all the users in "Visitors" group. I am surprised! When I removed the user read permission again same error repeated for all the users. How can it happen?
DLL's that are placed in the bin folder do not run uner Full Trust, you need to create a Code Access Security (CAS) policy file and deploy that to your sharepoint application. CAS policies are used by the .NET framework to assign execution rights etc. to (specific) dll's.
More info here.
I have a user control which is being added to a page dynamically. It works fine on my computer whether a site is running on an integrated Visual Studio server or deployed to IIS.
But when the site is deployed to a production server, I see the contents of a user control's code-behind file instead of a control.
Have you any ideas what can cause this?
Thank you.
EDIT: The site is running on IIS 6 and here is the code I am using to add the control to a page
`this.Controls.Clear();
this.Controls.Add(LoadControl("MyUserControl.ascx"));`
Yikes. That should never happen. Are other ASP.NET pages working correctly? Are you sure ASP.NET is properly registered on the server? I think you'll need to give us some more information... what version of IIS are you running, and post the code where you dynamically add the user control.