Question

I'm fairly new to SharePoint, and I was given the task of creating an application that basically consists of a couple of static pages that consume Java-based web services.

Currently, I'm creating these application pages with Visual Studio 2010, which automatically maps them to the Layouts folder, therefore making my pages accessible as http://localhost/_layouts/MyApplication/MyCustomApplicationPage.aspx.

What I'd like to do, is to customize these URLs, and structure my application pages in several directories, in order to access them as, for example, http://localhost/MyCustomDirectory/MyCustomApplicationPage.aspx, instead of http://localhost/_layouts/MyCustomDirectory/MyCustomApplicationPage.aspx.

In other words, I'd like to remove the _layouts part from the URL, and replace it with my own subdirectories. Is this possible without creating virtual directories in IIS? I do not have physical access to the server; all I can provide is a WSP.

Était-ce utile?

La solution

No, that's not possible in SharePoint, application pages should be in the _layouts folder (or _admin for application pages for central admin).

You can put pages as http://localhost/MyCustomDirectory/MyCustomApplicationPage.aspx, but then they should be site pages, which you provision using a "Module" element from Visual Studion. But be aware that then users will be able to modify them using SharePoint designer.

Technically it's possible to put application pages in another path by introducing new IIS virtual directories, but you shouldn't do that.

Autres conseils

It is possible.

Install CKSDEV on your development machine, and then add a Basic Site Page to your project. While that SPI won't give you a code behind file, you can certainly tweak it to use one, just like any other ASP.NET page.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top