Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Must hard-code web service calls within an event handler?

  Asked By: Alexandria    Date: Oct 22    Category: Sharepoint    Views: 1701

My developer is telling me that the URL for the web service called by
his event handler must be hard-coded rather than being something we can
specify in our configuration file. This will cause us to have to go
through an IT redeployment if the URL for the web service changes, so
we want to avoid that.

Does this make sense that the URL for the web service would have to be
hard-coded? I can't imagine why.

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Freddy Heath     Answered On: Oct 22

No, you do not have to hard-code configuration  settings into your event  handler.
The issue is that event handlers are deployed to the GAC, so they do not work
with configuration settings in the web.config file. You must add the
configuration settings to the machine.config file  instead..

See more details on my blog here:
www.sharepointblogs.com/.../12121.aspx

 
Answer #2    Answered By: Joanna Dixon     Answered On: Oct 22

I'm not sure if this is my exact situation. We use a
configuration list in the SharePoint area to handle the majority of
our configuration  issues. This works VERY well and allows us to
change the behavior of our EHs without any IT involvement at all.

The issue is specifically with a call out to a web  service. We
figured that could be put in our configuration list as well, but our
developer is telling us that URLs for web services specifically
cannot be put into the list and must rather be hard coded into the EH
itself.

Is there something weird about calling web services that would
prevent the URL of the web service  from coming in as a configuration
list input?

 
Answer #3    Answered By: Jaime Weaver     Answered On: Oct 22

Have your developers read thru this MSDN article on writing "service
virtualized" Web Services for SharePoint:
http://tinyurl.com/krsoj

Web Services can be virtualized for the entire farm or embedded directly
in the Web Part itself such that wherever the Web Part is added, it will
have access to its embedded Web Service. I demonstrate the later in the
AJAXian Web Part code downloadable from the Mindsharp Premium Content
page.

 
Answer #4    Answered By: Anibal Baird     Answered On: Oct 22

The URL for a web  service (or anything for that matter) can be put anywhere,
including inside a list. Maybe your dev doesn't know how to redirect the call to
a web service  so that's why he's saying it has to be hard coded. There's no
reason why it has to be (and shouldn't).

 
Answer #5    Answered By: Karla Morrison     Answered On: Oct 22

I have just received a copy of SBS SP2 ..can someone tell me what version of WSS is on this…(3.0) and point me to install directions when you have SQL 2000 serving the WSS Content Database? I assume I will need to migrate to SQL 2005 Workgroup addition?

How close is this all to MOSS 2007?

 
Didn't find what you were looking for? Find more on Must hard-code web service calls within an event handler? Or get search suggestion and latest updates.




Tagged: