c# - SharePoint Event Reciever Works On One Machine/computer/user -
so have created updated version of wsp sharepoint 2010 due our migration/update 2007 2010.
the wsp event handler/reciever itemadded() , have working intended. issue operation seems work 1 computer/machine , no others.
when item added list wsp creates folder in shared documents library, creates wiki page, updates new list item links shared doc , wiki.
when triggered machine #1 , user #1 operations work, when machine #2(m2) , user #2(u2) or m3 , u3 non of tasks take place when new item created.
user #2 can log in on m1 , create new item , operations work. if u1 uses m2 or m3 create item events don't trigger. machine #1 able trigger event many times want no other computer able to.
if able follow code or sort of cache setting on local machine or sp server, or else? appreciated.
update: machines on same network. non of machines server various personal laptops. development done on separate machine. accessing via same url. users have same access. on our test site switched being production once migration/upgrade takes place.
before current .wsp deployment noticed same issue reverse, machine #2 did updates machine #1 , #3 couldn't. thing can think of machines first trigger event after deployment.
i'm not doing .wsp install our guy is(won't let have access :/ understand) below install commands running.
add-spsolution -literalpath "ourpath/ourfile.wsp"
install-spsolution -identity ouridentity -webapplication http://myhost.com/ -gacdeployment
below main part of code
public class createwikiandfolder : microsoft.sharepoint.spitemeventreceiver { public override void itemadded(spitemeventproperties properties) { try { //this.disableeventfiring(); base.eventfiringenabled = false; string surlofwikipage = string.empty; string surlofnewfolder = string.empty; string ssubsiterul = string.empty; string scurrentitemtitle = properties.listitem["title"].tostring(); string swikilistname = "tr wikis"; string sdoclibname = "shared documents"; string strlistid = "tr status"; if (strlistid.toupper().equals(properties.listtitle.tostring().toupper())) { //create folder surlofnewfolder = createfolder(properties.listitem.web, sdoclibname, scurrentitemtitle); //create wiki string itemdispformurl = string.concat(properties.listitem.web.url, "/", properties.listitem.parentlist.forms[pagetype.page_displayform].url, "?id=", properties.listitem.id.tostring()); surlofwikipage = createwiki(properties.listitem.web, swikilistname, scurrentitemtitle, itemdispformurl, surlofnewfolder); //update current tr item spweb myweb = properties.listitem.web; myweb.allowunsafeupdates = true; splistitem mylistitem = properties.listitem; spfieldurlvalue sharefolderurlvalue = new spfieldurlvalue(); sharefolderurlvalue.description = "shared folder"; sharefolderurlvalue.url = surlofnewfolder ; mylistitem["sharedfolder"] = sharefolderurlvalue; mylistitem.update(); myweb.allowunsafeupdates = false; } base.eventfiringenabled = true; } catch (exception e) { //currently throwing nothing } } }
it hardcoded path/url, there not enough information identify problem, glad update answer more detailed theory if provide more details or if share of code.