.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

The virtual path '/_catalogs/masterpage/v4.master' maps to another application, which is not allow

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :SharePoint


i am creating my asp.net solution on the sharepoint(asp.net website)

(i using sharepoint2010-s1 and visual studio2010 and .net3.5)

 i using the code 'this.MasterPageFile=_myTeamSite.MasterUrl'(_myTeamSite is instance of spweb)

when test the code,this point i recieved error:

The virtual path '/_catalogs/masterpage/v4.master' maps to another application, which is not allowed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The virtual path '/_catalogs/ma

View Complete Post

More Related Resource Links

Virtual path provider to have custom path tokens in master page references


I managed to port Asp.net MVC to run in a Sharepoint site (only inside a particular folder not everywhere) by:

  1. Writing an IHttpModule that I use to register routes, areas, view engine and virtual path provider inside the Init method, that is called only once per application life hence it works like an application_start event
  2. Writing a custom URL routing module that only performs routing for a particular subfolder path, all other paths are ignored, so everything else works just as it does and is completely handled by sharepoint
  3. Writing a custom view engine that defines different view/master paths related to the subfolder where MVC is running
  4. Writing a costom virtual path provider that should allow me to reference masterpages based on my configured subfolder where MVC is running.
  5. Adding a virtual folder (without assigning it an application) to my Sharepoint's site, so my app will be running as part of Sharepoint site and not as a separate application
  6. Customizing Sharepoint site's config to add my MVC application's configuration, adding MVC assemblies to compilation section, adding namespaces to <pages> element so I my view will see Html helpers, and adding two modules (my intialization module that registers routes etc) and subfolder routing module.

But I would like to accomplich

Error:An error occurred during the processing of ***/_catalogs/masterpage/default.master.

Hi all,

I added some scripts in file "default.master" to do some change to masterpage. ...I must type some wrong scripts there......
After I checked in, a horrible things happened---I couldn't browse my site again, and the Error page shows:


An error occurred during the processing of /sites/***/_catalogs/masterpage/default.master. The server block is not well formed.

Troubleshoot issues with Windows SharePoint Services.

Help, Please!!
Thank you!

Virtual Path Problem


 I get the following error on last line below (working on remote host): 'E:\web\sfcascom\ls_admin/uploads/images/001.JPG' is not a valid virtual path,

Note that the slashes go in different directions

I've tried a number of things but nothing seems to work. Thanks-


Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Web.UI.WebControls

Imports System.Drawing.Imaging.ImageCodecInfo
Partial Class Protected_imageupload
    Inherits System.Web.UI.Page
    Private Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        ' Initialize variables
        Dim sSavePath As String
        Dim sThumbExtension As String
        Dim intThumbWidth As Integer
        Dim intThumbHeight As Integer
        Dim sFilename As String = ""
        ' Set constant values
        'sSavePath = "images/"
        sSavePath = Server.MapPath("~/") + "ls_admin/uploads/images/"

        sThumbExtension = "_thumb"
        intThumbWidth = 160
        intThumbHeight = 120

        ' If file field isn?t empty
        If FilUpload.PostedFile IsNot Nothing Then
            ' Check file size (mustn?t be 0)
            Dim myFile As Http

Difference Btw Website vs Web application and Virtual directory in IIS 7


May i know what is the Differenc that they actually make in IIS7 .

Please tell me at a low level as i am still a novice in Asp.Net


Thanks in Advance.


Designer crashes sometimes because application path becomes C:\Windows\system32

Sometimes VS crashes as it seems to execute the WPF designer in its directories or C:\Windows\system32. Sometimes it works fine as we can preview saved settings in the Designer. I have set application path as follows : ConfigFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "mixer.ser");<br/> When VS crashes I accept to debug it, the exception is : {"Access to the path 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\mixer.ser' is denied."}    System.Exception {System.UnauthorizedAccessException} ... or c:\windows\system32 Any ideas on how to fix this ?   Thank you !

send credentials for virtual directory through application

Hi All,Please let me know that how to send credentials for virtual directory through application.Thanking You...

Pass virtual directory credentials through application

Hi All,We have created a website and for the secured files created a virtual directory and in virtual directory properties we selected Application-user(pass through authentication).If any user directly browse the files link then the browser prompts a screen for virtual directory credentials.Here my requirement is i need to send the virtual directory credentials through the application.Please let me know.Thanking You..

SPD message - The URL ../../_catalogs/masterpage is invalid

When I open a page on one of my SP (MOSS 2007) sites using SharePoint Designer I get a pop-up with this error. I click OK and the page seems to load fine... as far as I can tell. These pages are in a publishing site, but aren't under the control of the publishing feature - they are forms for a list.   I've searched around for some info on this error and have found a lot of solutions for masterpage, but nothing for this one specificaly related to SPD. Any thoughts?   Thanks! Brent

dllimport("mapi32.dll") changes the path context of application (i.e. relative paths start pointing

I have a WPF desktop application. We use mapi32.dll to show a new outlook mail window to allow user to send an email. After user sends email / just closes the new mail window without sending email, relative path starts pointing to C:\Program Files\Microsoft Office\Office12. I have office 2007 installed.  How can I restore this relative path ?   Thanks & Regards, Nadeem Ullah

How to Find out Windows service application path from Code ?

Dear frnds, Could you please help me to find out the path of  windows serivce exe ( application path ) from code?   Regards. Sajid P K  

Masterpage didnt get applied to a particular _Layouts files(application page) for EditUserPref.asp

Master page did nt  get applied to a application page  (_layout file),   but other layout pages have the master page applied. EditUserPref.aspx  ->  Im accessing from search preference - http://i34.tinypic.com/34xi9t5.jpg  

Map a network share to a virtual directory path @ runtime

Hi Guys Have run into an interesting issue. We have an asp.net web application - we can deploy it over the internet, the secure intranet, local offline user laptops. On of the teams in our organization has a product by which they develop static html reports from the main database. Originally we developed a module in our app which is nothing more than an iframe. Since the html files were pushed under our application virtual directory we used to use java script to set the source of iframe to http://server/app/module/fileXXX.html   Now due to some deployment procedure changes and some security issues the html reports will be deployed on another network server and exposed through a share. Also the share will not have IIS so not virtual directory. So we can no longer set the iframe source through java script to a web file.   Is there any way i can @ runtime map a folder in my application virtual to the network share so that we can browse to these web files like before (Copying the files over from the share to my Virtual Directory is not a very elegant soln.)   Thanks Regards Siddharth

How To Use a Specific Sites' Master Page for my custom asp.net application

I have a custom application that I migrated to sharepoint (compiling into single DLL and creating a fodler for it in the layouts folder in 12 hive) Currently, I am using ~/_layouts/application.master as my masterpage for the custom application. However, i would like to use a certain site's master page for my application versus the default one. For instance, I would like to use the master page from this sub site www.maindomain/sites/subsite/ Thanks for your help.

JS script file path screwed up after deploying MVC application

Hi,  I am relatively new to MVC, after deploying my MVC application as per Haack http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx i seem to have got a new problem. My Jquery doesnt seem to get recognized. I get "object doesnt support this property or method " at this line "jQuery(document).ready(function() {" i have tried all sort of things including changing the js script file path to relative and absolute, setting base tag etc. Kindly advice if the above method of deploying is right and if that is what is causing the issue and if there is some other way to handle the .mvc requests.   Thanks and Regards, Muzammil Ahmed

How to customize an Application master page in MOSS 2007


I have a Collaboration sitecollection and made changes to refer to my custom master page in the Master page settings page.Also used the same custom page for Site Master page section.

But if I go to Documents library and click on upload documents then I am getting the UI of application master page.

How can I get rid of those menus.

Thanks in advance.

Building Mobile Web Application For Live Maps


Hello Everyone,

                        I am planning to build an Mobile Web Application for showing live maps (tracking). I already have an Web Application created which has database  that gets updated on the go, receiving data from GPS devices. So the GPS device gets tracked LIVE! This information is shown using Open Source Street Maps & Silverlight & ASP.NET.

The features that i would require for my mobile web app is:

1. Showing live location of a GPS device (I already have the database). Also show the moving path of the device.

2. Providing login functionality.(Connected to the database that i already have)

3. Store user prefferences like username, password, selected location etc.

Can any one give me a lead as to how i should go about this. I have to make sure that my application is compatible with maximum possible mobile devices. Do you think that ASP.NET is the best platfrom to build this WebSite, cause i am even open to other platforms?

Thanks in advance

why do nothing .NET application allocates 500 MB virtual memory?


I'm wondering why an empty .NET console application (only has Console.WriteLine() and Console.ReadLine()) allocates 500 MB of virtual memory?  By the way, this is running on a dual core with hyperthreading.

The 500 MB is allocated when I compile with the 3.5.30729.4926 compiler and don't target any platform.  I'm running Windows 7 x64 so this 500 MB is for the 64 bit application.

If I compile with the 32 bit compiler, 8.00.50727.4927, the 32 bit application allocates 117 MB of virtual memory.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend