var b = new UriBuilder(Request.Url) { Query = "" };
Just employs some of syntactic sugar, it can be re-written.
UriBuilder b = new UriBuilder(Request.Url);
b.Query = "";
The
var
keyword replaces the type name in the declaration, it is worked out by the compiler at compile time.
{ Query = "" }
sets the
b.Query
property to "".
[Edit]
In response to the OP's comment
Wow I misread the earlier part of your code. The answer is keeping the query string will very probably cause problems. The second parameter in
openid.CreateRequest(discoveryUri, b.Uri, b.Uri);
needs to be "
the shortest url that describes your wesites address[
^]". This can't possibly contain the query string. Also, it
is possible that the string you are passing is
not short enough as the Open Auth object expects
www.foo.com, not
www.foo.com/bar for example. It is doubtful that the third parameter should have the query string either, but this depends on what the page you land on in your site after successful authentication expects:- you'd need to check this.