I am currently training on sharepoint and have few weeks experice with regards to development in sharepoint. My current task involves deploying a .wsp solution on a server farm, and did that using the powershell through the Add-SPSolution, Install-SPSolution, and did that successfully. The problem I am encountering is that in the spsolution I had a webpage named TestPage.aspx, I cant find where the page is residing such that I can access it. there a specific place where the page resides or any command which I can use?
Visual Studio usually creates a folder for application pages, so you may try:
http://server/site/_layouts/foldername/TestPage.aspx
where foldername is the name of your project/solution.
If you get "The resource cannot be found" - HTML 404 error, the site is not there.
Otherwise, even if it says "An Unexpected error has occurred" it does not mean the site is not there.
The site may exist, but has some errors. In that case the best way would be to check Windows Event Viewer and logs.
You cannot just add an aspx file and deploy on sharepoint.
Maybe what you are after is how to deploy an application page, an application page sits at the application level, so every site collection will be able to access it.
How to deploy an application page:
To add an application page do the following:
create a new empty sharepoint project
add "Sharepoint "Layouts" Mapped Folder to the project
in layouts folder create a folder (usually the name of the project)
add an application page to that folder.
that application uses sharepoint masterpage, put some content in.
Deploy using visual studio or compile and deploy the wsp using the method above
access the page in /_layouts/foldernamed/test.aspx*
If you are looking only to add some content to a sharepoint page, then I suggest you use a visual web control. it is basically a user control wrapped in a webpart. After deployed you can add it to a webpart page that you can create using the Sharepoint UI.
Related
I am new to sharepoint and have a scenario
1) I have a aspx page which displays some data from a xml.
2) The data is populated in a table in the aspx page using a code behind .cs file.
3) I use some dll's which I have made to access the data.
Note:- This things are done on my local pc which does not have a sharepoint server installed.
Now my question is
1) I want a way using which I can use this page as a webpart in a sharepoint site.
2) Can you please guide me a by which the compiled dll of the web application can be used as webpart.
Note:- I have access to put files on the server but cannot develop anything on that
You can use the User Control in SharePoint and add it to your site page..
OR
Use Visual Studio and create an empty SharePoint project (deploy as farm solution).
Then, right click project and add mapped layouts folder.
Rename this folder to whatever name you want to appear (this folder will get created on the servers layout folder in the hive) after you deploy the solution.
Add your aspx page and cs into this folder
Then, double click on package.package (its inside package, above layouts folder, under project)--> Advanced --> Add (existing assembly) and add your dll references here.(this will add the dlls under your sites sharepoint web.config.
After deploy, you can access page using: http://sharepointsite/_layouts/foldername/youraspxfilename.aspx
Let us know about the progress.
I am working with Kentico in Visual Studios (web project) on my local computer. When I add folders or files to the solution and then run it in the browser, the pages do not show up in the CMS desk or site manager. Am I creating these folders/files in the wrong place in the solution (ex: {directory of web project}/CMSPages/filename.aspx)? Or maybe have incorrect settings?
This is not the way how it works - the system has no idea about your pages if you place them on the file system. However, you can create ASPX page templates and then use then for the documents. Please see the Devnet forum
Best regards,
Juraj Ondrus
Where Do you want to use this page?
In the visitor sites or CMS Page
If you want to use visitor site you can create a webpart and add you webpart to the Page create on content tree.
If you want to use in the cmsdesk the you need to register your page in the module
I've been searching on Google for a resolution to this problem, but cannot find one that matches yet.
I'm trying to deploy a simple "Hello World" web part to SharePoint using Visual Studios 2010.
I'm getting an error when I hit F5: "Error occurred in deployment step 'Retract Solution': Cannot connect to the SharePoint site: http://example.com/. Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project."
Ok, I have done a lot of searching and I'll tell you what I've tried so far. I have full admin rights on the farm, full rights to both databases. I made sure the webpart URL property matches the site property listed in Central Admin as well.
If anyone has any advice or insight it would be greatly appreciated. Thank you in advance.
P.S. (Edit) Also, the farm I'm deploying to and visual studio are on the same machine? would that cause it?
Check the properties of your project in Visual Studio. Click on project node in solution explorer and press F4, then check there 'Site URL' property. It should contains one of the following
http://[your machine name][:port]/[site collection or web relative URL]
http://localhost[:port]/[site collection or web relative URL]
http://[your machine IP address][:port]/[site collection or web relative URL]
Note that Visual Studio must be installed on that machine which is your Web Front End or Application server.
If you got some errors with solution retracting try first deactivate and delete it via Central Admin. Then try to make some deploy-retract checking cycle in Visual Studio. If you still would get errors please post here the log from Visual Studio Output window (Ctrl+W, O).
I was able to go ahead and deploy the web part using STSADM commands from tutorials that you guys referenced in this topic, thanks so much for that.
It seems the problem I'm having involves multi-server install, and I don't think there is a quick work around yet.
Thank you all for the responses!
Follow below mentioned steps to debug this issue :
1) Browse the URL in IE on your server where you have hosted the http://mysite.com site.
2) If you are able to browse then try deploying this web part on another site by giving new site URL in project properties in Visual studio.
3) To deploy a solution onto a site you must have visual studio on the same computer where you hosting the site.
4) Try deploying WSP through stsadm, Click here to see the details. To create WSP in Visual studio right click on project -> click on 'Package' -> once its complete right click on project -> click on 'Open in windows explorer' -> open 'bin' directory -> open 'Debug' directory -> you shall see a file named as your project name & extension would be .wsp
5) If anything above doesn't help put down your deploying steps.
Please do the following
Can you first verify the Site Collection you are trying to deploy is working or not
Open the properties of the SharePoint Project >Properties(F4)> Build Tab and see that the platform has been set to Active(Any CPU).
Delete the Solution from Central Administration and then try to deploy the solution once again.
If you still have the same problem then attach the log file from the SharePoint logs.
Thanks,
-Santosh
Have you mention the Site URL property in Visual Studio Sharepoint project?. you can open using (ctrl+shift+p) for Window of Properties then Check project Properties and make sure Site
URL is the Web application where you want solution to be deployed.
might be helpful this link: http://www.dev4side.com/community/blog/2010/2/28/error-occurred-in-deployment-step-%27recycle-iis-application-pool%27.aspx
I'm using SharePoint 2010. I saved a Site Template(.stp) and used this template to create a sub site. Browser shows file not found error, however, if I add /_layouts/ChageSiteMasterPage.aspx to that URL, I'm able to see settings Page.
Error:
cannot create folder "Path".
Correlation ID: 4baa2636-0dd9-4965-afc1-e438d74a20d5
What could be the problem??
Search for that correlation ID in your SharePoint log. Probably the problem is because you need to activate a feature in the new site, or you have a custom solution that you need to deploy there.
Go to Site Setting and open the Master Pages section. Look for anything checked out and chack it back in. This happens each time you create a new site from a template.
I have a Site Template with few customized lists and customized pages. I create new webs when ever needed using the site template. After creating the web, I also set up a theme and unique permissions to the web using C# code itself, then I redirect the page to the newly created web URL. My code runs within a Long running operation. It works all the time fine, but in some circumstance I get an error "file not found" when the page re-directed to the newly created web.
When I had closer look, I see that the web was properly created and the permissions were set; the pages library & other lists are also found, but the master page gallery is not found. Due to that I could not browse any pages in the page library & I could not even check web theme. When I see the Logs I found the below error.
04/09/2009 14:22:49.35 w3wp.exe (0x11B4) 0x0D0C Windows SharePoint Services General 8z1y Medium Failed to create list "Master Page Gallery" in web "http://rootsite/subsite", HRESULT=0x81020012. List XML: ""
What could cause this issue? I don't get this all time only sometimes I get this issue. There were no errors thrown on code, but the web's master page gallery was not created. Have you ever faced such problem? How can I solve this?
Thanks in advance,
~Yuva
The HRESULT you're getting is from a COM error: System.Runtime.InteropServices.COMException (0x81020012): The specified name is already in use.
Make sure that the gallery you're trying to create is at the web level, not the site or webapplication level. Can you post examples of the URL when it worked vs. when it didn't?
Isn't the master page gallery usually at the site rather than web level? Subsites can use a master page defined by the parent site, so you could be confusing things by trying to define the master pages on the subsite as well.