Request for permission of type System.Net.WebPermission

V

Victor

Help!

I am using Microsoft Infopath Project to create my infopath form with
VB.net. I also write webservice to retrieve sources from SQL server. When i
run my infopath which i publish in a server called
https://projects.today.com/victor/ in my computer, i can retrieve the source
(database data ) in sql server by calling the webservice. But when i run the
infopath form which i publish in https://projects.today.com/victor/ from
other user's computer, i got this error message :

Request for the permission of type System.Net.WebPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.

What must i do in order for my infopath form to be launched in other user's
computer from the server(https://projects.today.com/victor/)? I know the
security issue coems from the webservice that i call. But i don't know how to
enable the permisssion in order to access the webservice from other user's
computer.

Please help.

Thank you.

Rgds,
Victor
 
V

Victor

Hi Bryan,

Thanks for your reply. I am using the default setting for the security
level of the form. I chose "Automatically determine security level based on
form's design(recommended)"

This is because i don't know where to get the digitally signed
certificate if i set the security level of the form to full trust.

Can you suggest a solution? Is this problem caused by the form's
security level?

Thank you!

Rgds,
Victor
 
S

S.Y.M. Wong-A-Ton

You need to give your form template full trust and sign it with a digital
certificate. This article
http://msdn2.microsoft.com/en-us/library/aa168019(office.11).aspx is for
InfoPath 2003, but it contains all the instructions you need to digitally
sign your form template to give it full trust (see "Digitally Code-Signing a
Form Template" section) as well as how to request a certificate if you do not
want to use a temporary one (see "Requesting a Digital Certificate from the
Certificates Snap-in" section).
 
V

Victor

Hi Wong,

Thanks for giving me this tips. I have tried to set my form to Full
Trust and created a cetrtificate. It works. But every time the user opens the
form, infopath will ask the user to install the certificate first and close
the form then open again. Some users may not know what to do. Furthermore,
installation of certificate into each computer creates some administration or
licensing issues for the System Administrator and they have some grumbles.

Subsequently we found out that by going to Control Panel->Administrative
Tools->Microsoft.Net Framework 1.1 Wizards to set the Local Intranet to Full
Trust level will stop the message "System.Net.WebPermisssion" from prompting.
But this also troublesome as i need to go to each computer to set the Local
Intranet to Full Trust level. It can be done but we think it's not the final
solution.

Again we tried to another way, we realised that when we call webservice
thru infopath built in engine (not from code behind), there is no security
checking. So, we slowly studied the the rules and we used the Infopath Rules
to set the condition and we successfully call the webservice thru infopath
without having to go thru the .net framework security checking.

Thanks for your tips.

Now, i have a big problem in auto-firing the email alerts or reminders
to the user who posted the report in the Sharepoint form library. My report
will publish Report status field of 'Initial' or 'Final'. My question is when
the user publish the Report with the report Status='Initial', after 7 days of
submission, if the report status still in 'Initial' status, i want Sharepoint
to auto-fire an email reminder to remind the user to update the report status
to 'Final'.

There is this Sharepoint Reminder service in the Internet but it needs
licesnse of purchase. It provides for downloading, but when i install, the
Web Part portion failed. It does have manual in establishing the web part
portion but i find it not understandble.

Any help would be greatly appreciated!

Rgds,
Victor
 
S

S.Y.M. Wong-A-Ton

Hi Victor,

Thanks for the information you've provided; it's very useful!

Regarding your alerts issue: I do not have much experience with alerts in
SharePoint. Have you already tried asking this question in one of the
SharePoint groups? In any case, I don't think it would be too difficult to
create your own Windows Service that would function as an ' InfoPath form
watcher'. The basic idea is that you would need to let the service run under
the identity of a user that has access to the document library containing the
forms. Then, you could let it check every night whether there are forms that
need alerts being sent out. Typically, you would download each form (see
http://enterprise-solutions.swits.n...ly-retrieve-infopath-form-from-sharepoint.htm
or use the SharePoint object model to retrieve forms), analyze the date
stored in the XML of the form to see whether the form has passed its due
date, and then use an email address in the form (if there is one?) to send an
email out to the user. Hopefully you do not have too many forms stored in the
document library and can do the checking overnight not to affect the
performance of the server too much?

Hope this helps. Thanks once again for your security findings and keep your
findings coming!
 
V

Victor

Hi Wong,

You are welcome for the information i provided. In fact, it's great fun
to explore Infopath's functionality and gets very excited when you found how
great Infopath's engine can do to make my program workable. Ya! I also find
it very useful when i got to know that security issues can be set via Local
Intranet and also can be avoided via Infopath's rules. Hehe..

I have not yet asked my question in Sharepoint forum. I don't know the
sharepoint forum's url. Maybe you can refer me. Thanks. And, as for Windows
Service, i am not a bit clever in this so can you guide me? I can have access
to the document library but creating Windows Services i have no idea. It
would be great with your assistance and advice.

I followed your referred url, but the teaching needs sharepoint server to
be version 3. Mine is only version 2.But i do have one sharepoint version 3
for testing in the company . It's not laucnhed across the company for users
where my program needs to be lauched in the company and used by all the
users. I can try your method and deploy my infopath to sharepoint version 3
first and see how it goes.

At the same time, i would like to look for solution that is suitable to
be used in sharepoint version 2 because sharepoitn version 3 is not going to
be launched in the near future.

Can you provide me some ideas on solutions using sharepoint version 2?

My program needs to be ready by next week Monday. I am still looking for
the soltuion.

Your effort in helping me is very much appreciated!

Rgds,
Victor
 
S

S.Y.M. Wong-A-Ton

Hi Victor,

The sample on my website contains 2 possible ways of retrieving a form. You
can use the solution for the WebClient class to retrieve forms, since it
should also work for WSS v2. Or if you have experience with the SharePoint
object model, you could use its classes to retrieve forms.

As for creating a Windows Service, check out these 2 articles:
http://www.codeproject.com/cs/system/WindowsService.asp
http://www.codeproject.com/dotnet/simplewindowsservice.asp

Monday is a tight deadline if you do not have much experience with Windows
Services. I hope you'll make it, though. Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top