By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,162 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,162 IT Pros & Developers. It's quick & easy.

Web Service - Invoke button missing?

P: n/a
Hi. I've inherited a Web Service from a developer who is no longer
here. One of the purposes of the service was to clear the cache on the
server side. Up until a few days ago, it worked fine - I'd open up the
service from my browser, select the appropriate function from the list,
click the Invoke button and all worked well. One of the things I do
each fiscal quarter is to make a change to the service, so it will
return the correct fiscal year and quarter. It is hard-coded. Yes, I
know...it should have been in a table. But, that's the way it works
and what I have to deal with. Anyway, I made the latest change and the
Invoke button has disappeared. I'm sure I did something, but not sure
what.

Before this started to not work, there was a message that said, "To
test the operation using HTTP POST protocal, click the 'Invoke'
button.' Now it says "The test form is only available for requests
from the local machine." I suppose I could go to our web server and
invoke it there when I need to, but I'd rather not.

I don't have any real experience with Web Services and how they work,
or even know any C# code (which is what it was written in), other than
to be able to read it a little bit. Does anyone have any suggestions
as to what I might look for to determine the cause of a missing Invoke
button?

May 19 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I think you can invoke webservice from browser only if you are on local
machine (or from server )
I hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

May 19 '06 #2

P: n/a
Well, I'm not sure about that. Like I said, it's worked fine before.
But thanks for the thought!

Thanks,
Jennifer

May 19 '06 #3

P: n/a
I meaned on machine where WebService is hosted

Regards
Galin Iliev[MCSD.NET]
www.galcho.com

May 19 '06 #4

P: n/a
Well, I see someone has already answered the Invoke question. But, I would
like to comment on the fiscal year and quarter issue. I would say that it
doesn't even need to be in a table. It can be done mathematically. Below is
an example for determining that same information for the government's fiscal
year. It ends on 9/30 and begins on 10/1. The line "fiscalQuarter += 3 -
(fiscalQuarter % 3);" would never change no matter when the fiscal year
starts, but the line "int fiscalQuarter = myDate.Month + 3;" changes
depending on the month that it ends. There are 12 months and the govt fiscal
ends at the end of the 9th. 12 - 9 = 3. That's where the 3 comes from. The
bottom part that calculates the fiscal year uses the same principle.

DateTime myDate = DateTime.Now;
int fiscalYear = myDate.Year;
int fiscalQuarter = myDate.Month + 3;
fiscalQuarter += 3 - (fiscalQuarter % 3);
fiscalQuarter = fiscalQuarter / 3;

if (myDate.Month > 9)
fiscalYear++;

MessageBox.Show("fiscal year = "+fiscalYear.ToString()+" quarter =
"+fiscalQuarter.ToString());

"J.**********@gmail.com" wrote:
Hi. I've inherited a Web Service from a developer who is no longer
here. One of the purposes of the service was to clear the cache on the
server side. Up until a few days ago, it worked fine - I'd open up the
service from my browser, select the appropriate function from the list,
click the Invoke button and all worked well. One of the things I do
each fiscal quarter is to make a change to the service, so it will
return the correct fiscal year and quarter. It is hard-coded. Yes, I
know...it should have been in a table. But, that's the way it works
and what I have to deal with. Anyway, I made the latest change and the
Invoke button has disappeared. I'm sure I did something, but not sure
what.

Before this started to not work, there was a message that said, "To
test the operation using HTTP POST protocal, click the 'Invoke'
button.' Now it says "The test form is only available for requests
from the local machine." I suppose I could go to our web server and
invoke it there when I need to, but I'd rather not.

I don't have any real experience with Web Services and how they work,
or even know any C# code (which is what it was written in), other than
to be able to read it a little bit. Does anyone have any suggestions
as to what I might look for to determine the cause of a missing Invoke
button?

May 19 '06 #5

P: n/a
Jennifer,
you need to explicitly enable whatever protocols are to be allowed from a
remote machine in the web.config (There are additional entries beyond what is
shown below):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
... <system.web>
...
<webServices>
<protocols>
<add name="HttpPost" />
<add name="HttpGet" />
</protocols>
</webServices>
...
</system.web>
</configuration>

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jennifer" wrote:
Well, I'm not sure about that. Like I said, it's worked fine before.
But thanks for the thought!

Thanks,
Jennifer

May 19 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.