473,769 Members | 3,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exchange WebDAV

4 New Member
I am now working on C# with WebDAV on Exchange now to get appointments. When I work local on the domain where the server is, i can get the appointments no problem. When I work outside of it, i get an SecurityExcepti on. This is my code to get the appointments:
protected void getAfspraken()
{
NetworkCredenti al credential = new NetworkCredenti al("bhees","123 4567", "oaicttest" );
WebdavSession session = new WebdavSession(c redential);
session.UserMai lbox = "http://192.168.0.56/exchange/bhees/";

Resource resource = new Resource(sessio n);

//retreive single appointment
//Appointment appointment1 = resource.GetApp ointment("http://myserver/exchange/Administrator/Calendar/appointment1.em l");

//retrieve all appointments from Calendar folder
Appointment[] allAppointments = resource.GetApp ointments();

//retrieve all appointments from specified folder
//Appointment[] testAppointment s = resource.GetApp ointments("http ://myserver/exchange/bhees/Calendar/Test");

//retrieve all appointments from specified public folder
//Appointment[] publicAppointme nts = resource.GetApp ointments("http ://myserver/public/Calendar");

Response.Write( allAppointments .ToString());
}

I get following errors:

Regel 98:
Regel 99: //retrieve all appointments from Calendar folder
Regel 100: Appointment[] allAppointments = resource.GetApp ointments();
Regel 101:
Regel 102: //retrieve all appointments from specified folder


Bronbestand: \\fs11\ao-ict\UserData\ah oeve\Mijn documenten\Visu al Studio 2005\WebSites\W ebSite2\Default .aspx.cs Regel: 100

Stacktracering:

[SecurityExcepti on: De aanvraag voor machtiging van type System.Net.WebP ermission, System, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9 is mislukt.]
System.Security .CodeAccessSecu rityEngine.Chec k(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security .CodeAccessPerm ission.Demand() +59
System.Net.Http WebRequest..cto r(Uri uri, ServicePoint servicePoint) +166
System.Net.Http RequestCreator. Create(Uri Uri) +26
System.Net.WebR equest.Create(U ri requestUri, Boolean useUriBase) +373
System.Net.WebR equest.Create(S tring requestUriStrin g) +81
Independentsoft .Webdav.Exchang e.Resource.r(St ring A_0) +786
Independentsoft .Webdav.Exchang e.Resource.c(St ring A_0, String A_1) +60
Independentsoft .Webdav.Exchang e.Resource.a(St ring A_0, PropertyName[] A_1) +1593
Independentsoft .Webdav.Exchang e.Resource.GetP roperties(Strin g address, PropertyName[] propertyName) +34
Independentsoft .Webdav.Exchang e.Resource.d(St ring A_0) +992
Independentsoft .Webdav.Exchang e.Resource.GetM ailbox(String userMailboxAddr ess) +30
Independentsoft .Webdav.Exchang e.Resource.get_ Mailbox() +176
Independentsoft .Webdav.Exchang e.Resource.GetA ppointments(Boo lean recursive) +31
Independentsoft .Webdav.Exchang e.Resource.GetA ppointments() +27
_Default.getAfs praken() in \\fs11\ao-ict\UserData\ah oeve\Mijn documenten\Visu al Studio 2005\WebSites\W ebSite2\Default .aspx.cs:100
_Default.DropDo wnList1_Selecte dIndexChanged(O bject sender, EventArgs e) in \\fs11\ao-ict\UserData\ah oeve\Mijn documenten\Visu al Studio 2005\WebSites\W ebSite2\Default .aspx.cs:114
System.Web.UI.W ebControls.List Control.OnSelec tedIndexChanged (EventArgs e) +105
System.Web.UI.W ebControls.Drop DownList.RaiseP ostDataChangedE vent() +134
System.Web.UI.W ebControls.Drop DownList.System .Web.UI.IPostBa ckDataHandler.R aisePostDataCha ngedEvent() +7
System.Web.UI.P age.RaiseChange dEvents() +137
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +6953
System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +154
System.Web.UI.P age.ProcessRequ est() +86
System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context) +18
System.Web.UI.P age.ProcessRequ est(HttpContext context) +49
ASP.default_asp x.ProcessReques t(HttpContext context) in c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET Files\website2\ 10a0ed41\15fb0a 6\App_Web_kciwk sky.2.cs:0
System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute() +154
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean& completedSynchr onously) +64

Can someone please help me?
Mar 14 '07 #1
0 3399

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2135
by: Rob | last post by:
Hi all, I have done a lot of researching on the above topic and the only think I now know for sure is that I have to use either CDO or MAPI. What I need to do is this: I want to write a C# desktop application that will connect to the exchange server and retrieve mail from an inbox. The features are as follows: 1) I need to be able to specify the URL of the server I am connecting to
4
5220
by: Razzie | last post by:
Hey experts, First let me say I know almost nothing about Exchange, so if I say incorrect things about it, forgive me ;) What I need to do is, connect to the local Exchange server and monitor all incoming email. So preferably an event is raised when an email enters the queue. Is this possible? I've downloaded the Exchange 2000 SDK, but to be honest, I couldn't find any good samples there. Is there a tutorial somewhere on how
2
2792
by: George Durzi | last post by:
We recently upgraded to Exchange2K3/W2K3 from Exchange2K/W2K, and some of my c# code that I used to access users' contacts using WebDAV has stopped working. I'm getting a 401 unauthorized error. Hopefully, I can explain this adequately. Prior to the upgrade the following code was working properly. FYI: The site was running in the context of the domain administrator, and was also using the Administrator account to create a CredentialCache...
0
3873
by: Brian Henry | last post by:
I want to pull my contact list (personal one) from the exchange server into a local text file. I know how to write stuff into a text file, just getting it from an exchange server is my problem. I've been looking at webdav as a solution to this, but i dont know much about how to use webdav or it with exchange server. Right now i'm working with VB.NET I found a sample project at...
11
2842
by: ML | last post by:
What is th best/easiest way to access a public contacts folder on an Exchange server from a winforms vb.net applciation? I would like to be able to provide the user with a list of contacts and their associated details from what is stored in Exchnage on a custom form inside a winforms application.
7
3489
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show the 'send' button, (only 'reply' etc as if it was a received message). I'm using exchange explorer to see the difference in webDAV properties
2
4278
by: =?Utf-8?B?RGF2aWRF?= | last post by:
Hi, I try to connect to Exchange server using MAPI. I need to access a special user inbox and read all his new mails. The code I wrote work good, but I get my inbox instead of the user I need. Here the code : MAPI.Session objSession; MAPI.Folder objFolder ;
0
1318
by: teddy06 | last post by:
I have written code for read mails from exchange server. I have used webdav in my code. Its was working fine once upon a time. Currently configuration settings of client has been changed . so i am getting login timeout error. Can you pls help me out ? I dont know whether the WEBDAV is enabled or disabled.even i do not have access to enable it and see the configuration settings. pls provide some sample code for reading mails from...
5
3573
by: krasman | last post by:
hi everyone, i hope you might help me on this one. i need to create a contact in a exchange public folder using dotnet (vb or c#) and exchange 2003, without using outlook object model. i'm searching for a few hours and can't find a clear example on how to do it. i've already seen code blocks using webdav, directory services, but always related with creating active directory users or mail enabling users, not exactly what i'm looking for....
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.