Where is Live Photo?^^
MSDN Forums: Live Controls -
No photo show me this handler :
<%
@ WebHandler Language="C#" Class="LoadImageHandler" %>
using
System;
using
System.IO;
using
System.Net;
using
System.Web;
public
class LoadImageHandler : IHttpHandler
{
private string path = null;
private string dat = null;
private string lid = null;
public void ProcessRequest (HttpContext context)
{
foreach (string key in context.Request.QueryString)
{
if ("url" == key)
{
path = context.Request.QueryString[key];
}
else
{
if ("lid" == key)
{
lid =
HttpUtility.UrlDecode(context.Request.QueryString[key]);
}
else
{
if ("dt" == key)
{
dat = context.Request.QueryString[key];
//dat = HttpUtility.UrlDecode(context.Request.QueryString[key]);
}
else
{
context.Response.StatusCode = (
int)HttpStatusCode.BadRequest;
return;
}
}
}
}
if ((path == null) || (dat == null))
{
context.Response.StatusCode = (
int) HttpStatusCode.BadRequest;
return;
}
// Get Photo
HttpWebRequest serviceRequest = (HttpWebRequest)WebRequest.Create(path);
serviceRequest.UserAgent =
"Microsoft Windows Live Photo Demo";
serviceRequest.Method =
"GET";
serviceRequest.Headers.Add(
"Authentication", "DelegationToken dt=\"" + dat + "\"");
try
{
HttpWebResponse serviceResponse = (HttpWebResponse)serviceRequest.GetResponse();
context.Response.ContentType = serviceResponse.ContentType;
Stream s = serviceResponse.GetResponseStream();
int b = s.ReadByte();
while (b != -1)
{
context.Response.OutputStream.WriteByte((
byte)b);
b = s.ReadByte();
}
}
catch (WebException ex)
{
//The HTTP request failed, display what happened.
context.Response.StatusCode = (
int) HttpStatusCode.InternalServerError;
}
catch (Exception ex)
{
//The parsing failed, display what happened.
context.Response.StatusCode = (
int) HttpStatusCode.InternalServerError;
}
}
public bool IsReusable {
get {
return true;
}
}
}
Why??
I call that to show me the photo in a Image:
Image1.ImageUrl =
"./LoadImageHandler.ashx?url=" + url + "&lid=" + lid + "&dt=" + dt;
url, lid and dt are right at 100% but I have a blank image with the "x" red :/
Help me please!!! ^^
View article..
Domain already in use
MSDN Forums: Live Controls - I am trying to register a application for use with Contacts API and I get
The application domain cannot be added to the application because it already exists
I am pretty sure that there are no other app-ids within our company (the actual domain owner) registered with windows live.
Who should I get in touch with? One older post with similar issue suggests contacting Jorgen Thelin (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3563970&SiteID=1)- but I am not sure if he is the right person/moderator.
View article..
Invite contacts response unreadable
MSDN Forums: Live Controls -
I'm using the contacts API to get emails to send invitations. I get the delegation token, construct the invite contact request and I get a positive response. The problem is that I'm not being able to read the response. I get a lot of strange characters. To read the response I'm using UTF-8 format as in the examples.
Has anybody gone through this issue before? What can I do?
Thanks for the help!
View article..
Contacts Control v3 - IM function is not working with FF v3
MSDN Forums: Live Controls - Dear All,
We are trying to use the contacts control with Firefox 3. Control is loaded, email function is working as expected, but the IM function is not working. The IM icon does not appear in the control. Do you know any solution for this please?
Thanks,
Janos
View article..
Virtual Earth Map Control
MSDN Forums: Live Controls -
Any idea why I'd get the following error BREAKS Here (see yellow) using the New Template and runining in debug?
initialize :
function() {
///
/// Initialises the Map.
///
Microsoft.Live.ClientControls.VE.Map.callBaseMethod(
this, 'initialize') ;
//Bind to all form submits
this._onFormSubmitDelegate = Function.createDelegate(this, this._onPagePostBack);
var forms = document.getElementsByTagName("form");
for (var x=0;x
$addHandler(forms[x],
"submit",this._onFormSubmitDelegate);
}
this._original__doPostBack = __doPostBack;
this.__doPostBackDelegate = Function.createDelegate(this, this.__doPostBack);
__doPostBack =
this.__doPostBackDelegate;
//verify VEAPI has loaded
View article..
error 2003 while trying to refresh the consent token
MSDN Forums: Live Data - hi guys i have a problem with the refresh token
when i ask the consent token to microsoft
it response to me with a consent token but the refresh token is empty(null)
so someone knows how to fix this problem, so when i try to refresh the consent it gives to me this error code
thank you in advance
View article..
Live Contacts in Desktop App
MSDN Forums: Live Controls -
Hi,
Can anyone tell me how you can use live contacts api in a desktop app.
I have seen the post below which suggests that you cannot do this:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3345283&SiteID=1
but I still think that it is possible.
I can get a valid live id ticket using the C# code liveId.GetTicket("livecontacts.services.live.com", false);
after authenticating myself with the live ID client SDK.
Surely I can use this to access the Live Contacts API, though I'm struggeling to work out how.
There are apps all over the place that have been accessing hotmail address books for years, if you truely can't access live contacts with a desktop app could someone point me to an api or tutorial that can parse the hotmail address book.
UPDATE
Just to prove a point it appers that http://msdn.microsoft.com/en-us/library/bb463974.aspx is a desktop app / code library example, however, I don't know how I can make it work for my purposes because it stores the location id as a constant. I don't know where I could get a location id from without using the the delegated authentication sdk, which is web again.
Regards,
Richard
View article..
displayname in contacts api
MSDN Forums: Live Data -
I'm trying to display the contacts list of the user in my web application as they appear in Windows Live Messenger
I use the contacts API and, in some case, the is not up to date:
exemple: in my WLM contacts list, one of my contact has changed his display name, I see the change in WLM but the contacts API returns me the old display name (I verify with the interactive SDK)
could you explain me what is the problem? How can i have the contact list as it appears in WLM withe the contacts API?
thanks
View article..
DisplayName in contacts API
MSDN Forums: Live Controls -
I'm trying to display the contacts list of the user in my web application as they appear in Windows Live Messenger
I use the contacts API and, in some case, the
is not up to date:
exemple: in my WLM contacts list, one of my contact has changed his display name, I see the change in WLM but the contacts API returns me the old display name (I verify with the interactive SDK)
could you explain me what is the problem? How can i have the contact list as it appears in WLM?
thanks
View article..
change Sample1 of DelAuth SDK to get contact list.But ony 401 error returned...
MSDN Forums: Live Data - I have change Windows Live ID DelAuth Sample1 to get contact list.But ony 401 error returned.
Any Ideas?
Thanks.
using System;
using System.Web;
using System.IO;
using System.Net;
using System.Xml;
using WindowsLive;
///
/// This is the main page of the first Delegated Authentication sample.
/// It displays the link for granting consent as well as a user greeting.
///
public partial class DefaultPage : System.Web.UI.Page
{
//Comma-delimited list of offers to be used.
const string Offers = "ApplicationStorage.ReadWrite,Contacts.View";
//Name of cookie to use to cache the consent token.
const string AuthCookie = "delauthtoken";
// Initialize the WindowsLiveLogin module.
static WindowsLiveLogin wll = new WindowsLiveLogin(true);
protected WindowsLiveLogin.ConsentToken Token;
protected string ConsentUrl;
protected void Page_Load(object sender, EventArgs e)
{
//Get the consent URL for the specified offers.
ConsentUrl = wll.GetConsentUrl(Offers);
HttpRequest req = HttpContext.Current.Request;
HttpCookie authCookie = req.Cookies[AuthCookie];
// If the raw consent token has been cached in a site cookie, attempt to
// process it and extract the consent token.
if (authCookie != null)
{
string t = authCookie.Value;
Token = wll.ProcessConsentToken(t);
if (Token != null)
{
string lid = Token.LocationID;
long llid = Int64.Parse(lid, System.Globalization.NumberStyles.HexNumber);
string delegatedToken = Token.DelegationToken;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.UserAgent = "Windows Live Data Interactive SDK";
request.Method = "GET";
// Add the delegation token to a request header.
request.Headers.Add("Authorization", "DelegatedToken dt=\"" + delegatedToken + "\"");
//Issue the HTTP GET request to Windows Live Contacts.
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
//The response body is an XML stream. Read the stream into an XmlDocument.
XmlDocument contacts = new XmlDocument();
contacts.LoadXml(new StreamReader(response.GetResponseStream()).ReadToEnd());
Response.Write(contacts.InnerXml);
//Use the document. For example, display contacts.InnerXml.
}
if ((Token != null) && !Token.IsValid())
{
Token = null;
}
}
}
}
View article..
PreviousNext