Exposing a sub-directory using a separate IIS virtual application for asmx web service RRS feed

  • Question

  • Hi All,

    Not sure if this is the forum for this type of question, but its the only one I found that has web services in its description, my apologies in advance if incorrect!

    I have a VS project that consists sorely of asmx pages (yes, I know WCF are better, but my hands are tied on this :( ). This exposes server side functions for our (internal) products. But now I want to expose a subset of these methods to be publicly consumed. But I do not want to expose the internal methods on the same virtual, nor maintain two separate projects/codebases for it.

    What I considered for a solution was to create a sub folder in my project that would hold the new asmx files, create the methods that would internally call the relevant parent methods. So the structure would be something like this:

    • ProjectRoot\InternalMethods.asmx
    • ProjectRoot\PublicServices\PublicMethods.asmx

    Where InternalMethods.asmx would have the following methods:

    • LogonInternal()
    • GetSensitiveData()
    • GetPublicData()
    • LogoffIntenal()

    Then the PublicMethods.asmx would have the following methods:

    • LogonPublic()
    • GetPublicData()
    • LogoffPublic()

    The public methods would create an object of the IntenalMEthods class and call the respective internal method to send the data. Then the Internal only methods (ex: GetSensitiveData()) would not be exposed. Then when published to the server, I would create a separate IIS virtual application pointing straight to Root\PublicServices folder. This would be the URL that gets distributed to the public (ex:, as opposed to the internally used URL (ex:

    Problem is, this approach won't work. The PublicWebServices URL throws an error "Parser Error Message: Could not create type 'MyNamespace.PublicServices.PublicMethods'." which I believe implies that it cannot find the project dll as it sits in the bin folder directly under ProjectRoot.

    I would be much grateful if someone could advise me if there is a way I can get this to work without splitting to a separate project. Or is there a better approach to get the same results?



    Wednesday, November 19, 2014 2:26 AM


All replies