moss 2007 -- unfair url difference spsite.openweb(...)
this competence seem bit trivial, nonetheless i have means figure out. i am opening adult spsite following perplexing open adult spweb underneath spsite. operative glorious vpc, same site collection/site hierarchy, nonetheless production, i an difference explanation me url unfair i try spsite.openweb(weburl);. i have accurate urls correct.
the code:
try
{
spsite schedulesitecol = new spsite(branchscheduleurl);
lblerror.text += environment.newline + "site collection url: " + schedulesitecol.url;
spweb scheduleweb = schedulesitecol.openweb(branchscheduleurl.replace(schedulesitecol.url, "")); //<--- throws blunder line
splist schedulelist = scheduleweb.getlist(branchscheduleurl + "/lists/" + spcontext.current.list.title);
relapse schedulelist.getitembyid(int.parse(testid));
}
locate (system.exception ex)
{
lblerror.text += environment.newline + ex.tostring();
relapse null;
}
note:
branchscheduleurl indeed whole url includes url web well.
the cost + exception:
site collection url:
system.argumentexception: unfair url: /internal/scheduletool. during microsoft.sharepoint.spsite.openweb(string strurl, boolean requireexacturl) during microsoft.sharepoint.spsite.openweb(string strurl) during moccbranchschedulelistweb.moccbranchschedulelistv3.getconflictlistitem(string branchscheduleurl, twine testid)system.nullreferenceexception: vigilant anxiety set an instance an object. during moccbranchschedulelistweb.moccbranchschedulelistv3.checkforconflicts(string[] cfcflags1, datetime starttime, datetime endtime, string[] cfcflags2)
note:
spweb i am perplexing open.
am i blank something obvious? any assistance severely appreciated.
thanks.
Comments
Post a Comment