To make it simple as the title suggest I want the correct url from the feature!

atm when i was testing in test eviroment it worked well! I got the url using:

SPSite siteCollection = properties.Feature.Parent as SPSite;

moving on, I then started on my test server but it still is getting the url from my vpc? am i missing somthing?

my vpc url is http://mysite

my test url is http://welcome

when i activate the feature on test it throws an exception stating that the url http://mysite doesnt exist! but i know that beacuse im not on that server and the feature is not running on that server as its under http://welcome arrrrrrrhhhhh.

so is there somthing that im missing? like some caching that i dont know of?


LOL man i must be tired! well solved the issue! i cant belive its related to the account that i was using was not in the WSS_ADMIN_WPG group!

WOW they could of made it more obvious!

also like to note that I was updating the quicklinks dynamicly from a list, i got the same error when using a url that doesnt exist LOL soooo bad but iv learnt from it ;)

also like to note that you can get the same error from quick links as i was doing above but if the url is external it will throw an error as below! you need to check a checkbox in site settings to say that the links are external! that way it wont concat your links aswell

the error that i got was:

System.IO.FileNotFoundException: The Web application at http://*****:8437 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
   at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
   at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
   at Microsoft.SharePoint.SPWeb.GetServerRelativeUrlFromUrl(String fullOrRelativeUrl, Boolean includeQueryString, Boolean canonicalizeUrl)
   at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32 iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch)
   at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode node, Int32 iPreviousNodeId)
   at *****.InheritQuickLinks.Features.Feature1.Feature1EventReceiver.AddQuickLaunchItem(String header, String url, SPWeb web)
   at *****.InheritQuickLinks.Features.Feature1.Feature1EventReceiver.FeatureActivated(SPFeatureReceiverProperties properties)
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Benny Skogberg Jun 25 '13 at 10:56
  • You need to read before posting! i am the author for one and two the above solved my issue at hand! "account that i was using was not in the WSS_ADMIN_WPG group" that is the answer! i dont know how more clear i need to be ;) – Ali Jafer Jun 25 '13 at 11:11
  • 2
    Ahh, my bad. Got this in the review section which grays out the question. But by the wording it looked more of a midnight facebook post than an actual answer. Sorry about that :) – Benny Skogberg Jun 25 '13 at 11:16
  • 1
    lol its no probs! partly my problem! was frustrated and in a rush to answer the question! Im tiered and annoyed that iv spent alot of time for somthing so silly! :( – Ali Jafer Jun 25 '13 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.