I'm new to DotNetOpenAuth and new to MVC programming in general.
I have stared working on an MVC site.
I have decided I want to use OpenID for my login management.
I just created a test project based on the MVC project template.
This looks great.
Can you point me in the right direction of making my site's login/user
management function like the project template site does?
Do I need to copy all the files in the "RelyingPartyLogic" section to
my project, create the necessary tables in my database to mimic the
project template tables (and change pointers/connection strings), then
alter my AccountController to mimic one in the project template? (and
go from there?)
Before I start tearing my project apart I want to make sure I'm on the
right path.
Also, how do I get to Role management pages in the project template
site?
Thanks!
I just created a test project based on the MVC project template.
This looks great.
Can you point me in the right direction of making my site's login/user
management function like the project template site does?
Do I need to copy all the files in the "RelyingPartyLogic" section to
my project, create the necessary tables in my database to mimic the
project template tables (and change pointers/connection strings), then
alter my AccountController to mimic one in the project template? (and
go from there?)
Before I start tearing my project apart I want to make sure I'm on the
right path.
Also, how do I get to Role management pages in the project template
site?
Thanks!
The version number is 3.4.1.10044
Is this the latest version?
Our project isn't so big yet that we can't move our code into the
project template project.
However, our project is MVC2.
Will converting the project template to MVC2 break anything?
Thanks.
On Mar 18, 2:18 am, Andrew Arnott <andrewarn...@gmail.com> wrote:
> Hi Johnny,
>
> I'm excited for the step you're taking. I'll see what I can do to help.
> Inline...
>
Short and simple. I can confirm that there are no issues experienced when working under ASP.NET MVC2.
Enjoy!
---
Kind Regards,
David Christiansen | Chief Software Architect @ www.netidme.com
However, when I try to create a new project, I get this error:
"A problem was encountered creating the sub project 'OpenID'. The
project file 'C:\users\Johnny\AppData\Local\Temp\adfkadfa.mqi\Temp
\OpenID.csproj' cannot be opened.
The project type is not supported by this installation"
I hope this isn't too generic of an error.
I did some googling but didn't find anything that helped.
Any ideas?
I am in VS2010.
I have .NET framework 4.0 installed.
I have MVC 2 installed.
Thanks.
Let us know how you get on.
---
Kind Regards,
David Christiansen | Chief Software Architect @ www.netidme.com
Thanks.
To unsubscribe from this group, send email to dotnetopenid+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
One more kind-of off topic question:
I found a newer version of the project template than the one I just
installed (http://visualstudiogallery.msdn.microsoft.com/en-us/
81153747-70d7-477b-b85a-0374e7edabef)
Now when I go to add a new project, there are two "ASP.NET MVC OpenID-
InfoCard RP" templates to choose from. There's no way to tell which
version is which. How can I remove the older template? Where are
they stored? I've looked in "\My Documents\Visual Studio
2010\Templates\ProjectTemplates" and they aren't there.
Thanks
On Mar 19, 5:33 am, David Christiansen
<david.christian...@netidme.com> wrote:
> Hi Johnny,
> You should first check outhttp://www.dotnetopenauth.net/developers/quickstart-environment/and ensure you have all the prerequisites installed. Note that at the time of writing ASP.NET MVC was version 1, so it is possible that the error you are receiving is down to the project being an ASP.NET MVC 1 project. As I have 1 and 2 installed on my machine I have not encountered this issue.
>
> Let us know how you get on.
>
> ---
> Kind Regards,
> David Christiansen | Chief Software Architect @www.netidme.com
>
>
>
> -----Original Message-----
> From: dotnet...@googlegroups.com [mailto:dotnet...@googlegroups.com] On Behalf Of Johnny
> Sent: 19 March 2010 03:52
> To: DotNetOpenAuth
> Subject: [dotnetopenid] Re: How do I make my existing MVC application function like the project template application? [warning: noob level questions]
>
> OK, I downloaded and installed version 3.4.1.10051, foundhttp://visualstudiogallery.msdn.microsoft.com/en-us/a527c9a4-6032-43c...
But I think I maybe fixed it.
I found "MvcRelyingParty.zip" and "WebFormsRelyingParty.zip" in "C:
\Users\Johnny\Documents\Visual Studio 2010\Templates\ProjectTemplates
\Visual C#\Web"
If I delete/move the files, I'm down to one each (MVC and webforms)
projects in the New Project dialog.
Thanks.
On Mar 19, 9:00 am, Andrew Arnott <andrewarn...@gmail.com> wrote:
> Hi Johnny,
>
Any idea what's causing it?
Thanks.
(Sorry about the unfriendly URL. Google doesn't seem to want me to
post a URL)
To unsubscribe from this group, send email to dotnetopenid+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
Line 9: };
Line 10: %>
Line 11: <%= Html.OpenIdSelectorScripts(this.Page, null, options)%>
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
DotNetOpenAuth.Mvc.OpenIdHelper.OpenIdSelectorScripts(HtmlHelper
html, Page page, OpenIdSelector selectorOptions, OpenIdAjaxOptions
additionalOptions) in c:\Users\andarno\git\dotnetopenid\src
\DotNetOpenAuth\Mvc\OpenIdHelper.cs:131
ASP.views_auth_logonscripts_ascx.__Render__control1(HtmlTextWriter
__w, Control parameterContainer) in e:\_Dev_\Projects\MVC2OpenID
\MVC2OpenID\MVC2OpenID\Views\Auth\LogOnScripts.ascx:11
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +59
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1266
Thanks.
To unsubscribe from this group, send email to dotnetopenid+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Now I can build the site. I click Login. The popup comes up. I
click Google and I'm logged in!
But how can someone else login from the same browser? My wife came in
the room and I wanted to show her.
I clicked Log Off. Then I clicked Login. But the same thing
happened. It automatically logs me in. Is there a way to switch users
(besides opening another browser, going to google.com and logging out
there)?
So, I logged out of google.
I clicked Login. I typed her username and password and I get this
error:
Sequence contains no elements
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Sequence contains
no elements
Source Error:
Line 7: Welcome <b>
Line 8: <%
Line 9: var authToken =
Database.DataContext.AuthenticationTokens.Include("User").First(token
=> token.ClaimedIdentifier == Page.User.Identity.Name);
Line 10: if (!string.IsNullOrEmpty(authToken.User.EmailAddress)) {
Line 11:
Response.Write(HttpUtility.HtmlEncode(authToken.User.EmailAddress));
Source File: e:\path\Views\\Shared\LogOnUserControl.ascx Line: 9
Stack Trace:
[InvalidOperationException: Sequence contains no elements]
System.Linq.Enumerable.First(IEnumerable`1 source) +731024
System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__0(IEnumerable`1
sequence) +40
System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1
query, Expression queryRoot) +59
System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression
expression) +109
System.Linq.Queryable.First(IQueryable`1 source, Expression`1
predicate) +301
ASP.views_shared_logonusercontrol_ascx.__Render__control1(HtmlTextWriter
__w, Control parameterContainer) in e:\path\Views\Shared
\LogOnUserControl.ascx:9
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +59
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,
ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1266
Any ideas?
Thanks so much for all your help.
> ...
>
> read more »
> System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__0(IEnu merable`1
> ...
>
> read more »
> ...
>
> read more »