I am trying to get the dotnetopenauth oauth2 "windows live" example to work that is shown here:
https://github.com/DotNetOpenAuth/DotNetOpenAuth/tree/master/samples/OAuthClient
In the WindowsLive.aspx.cs page these two lines do not work:
windowsLiveClient.ProcessUserAuthorizationAsync
windowsLiveClient.PrepareRequestUserAuthorizationAsync
When I run the page it shows the error:
Compiler Error Message: CS1061: 'DotNetOpenAuth.ApplicationBlock.WindowsLiveClient' does
not contain a definition for 'ProcessUserAuthorizationAsync' and no extension method
'ProcessUserAuthorizationAsync' accepting a first argument of type
'DotNetOpenAuth.ApplicationBlock.WindowsLiveClient' could be found (are you missing a
using directive or an assembly reference?)
I am using the dotnetopenauth ultimate 4.3.1.13153 dll.
I also put these three files, that I got from the DotNetOpenAuth.ApplicationBlock folder, in my app_code folder:
IOAuth2Graph.cs
WindowsLiveClient.cs
WindowsLiveGraph.cs
I apologize for being a beginner. I have spent a few days trying a million different things and I can't get past this.
Related
Looking at core code examples of say... Edit Action for SpecificationAttribute. I am looking to replicate this delete function in the same manner in my plugin, however, getting an error.
Getting this error
'IHtmlHelper' does not contain a definition for 'DeleteConfirmation' and no extension method 'DeleteConfirmation' accepting a first argument of type 'IHtmlHelper' could be found (are you missing a using directive or an assembly reference?)
I have used in 3.90 but it getting error in 4.0 asp.net core Has anyone used #Html.DeleteConfirmation in a plugin (on administration side) that could give me a clues
I have a span element in the html like the following;
<span id="myattribute-delete" class="k-button">#T("Admin.Common.Delete")</span>
And trying to use #Html.DeleteConfirmation("myattribute-delete")
I know I probably need to double check my route, by the error is leading me to think the issue is not a routing issue.
As #Stephen stated it's not part of MVC, and it's custom helper by nopCommerce.
#Html.DeleteConfirmation is helper till/in nopCommerce 3.90, but in 4.0 it has been changed to
<nop-delete-confirmation asp-model-id="#Model.Id" asp-button-id="myattribute-delete" />
And that helper located at Nop.Web.Framework.TagHelpers.Adminso you have to add reference of it to your view file.
I am getting this error:
Error 40 The type or namespace name 'ViewAsPdf' does not exist in the
namespace 'Rotativa' (are you missing an assembly
reference?) D:\SandeepPatil\PPD_Projects\Code\Karma_Retail\Karma.Store\Areas\Admin\Controllers\OrderController.cs 1757 45 Karma.Retail.Web
You may be missing the reference to the Rotativa dll which was reported as an error in version 1.7.3, found here. There's now a prerelease version 1.7.4-rc which presumably fixes this issue.
This error is caused by trying to instantiate a Rotativa.ViewAsPdf object which, I am pretty sure, is not an object but a static method of the class Rotativa.
From the surrounding code I can read on your screenshot, I can assume the method ViewAsPdf returns a byte array, in which case the simplest solution would be to remove the new in front of it, which serves absolutely nothing in that case.
Please note that this answer is only based on assumptions due to the low amount of informations provided by your screenshot. You might want to publish your code in the question for us to better understand the context.
In section 5 of the ASP>NET MVC Music Store example, "Creating the StoreManagerController," when I click "Add" I get the error,
There was an error running the selected code generator:
'Unable to retrieve metadata for 'MVCMusicStore.Models.Album.'
The popular solution is to comment out the connection string in Web.config. This did not work for me. After trying many things I decided to add the code manually, by taking it from the completed code that's included with the example. When I do that I receive the error,
Compiler Error Message: CS0234: The type or namespace name 'Album' does not exist in the namespace 'MvcMusicStore.Models' (are you missing an assembly reference?)
and on line 31 I see the error,
public class _Page_Views_StoreManager_Index_cshtml : System.Web.Mvc.WebViewPage<IEnumerable<MvcMusicStore.Models.Album>>
Album is defined in the models folder. I have used webform development many times and am trying to add MVC to my repertoire. It seems to me "Album' is not registered, but I don't even know if that's appropriate lingo for MVC. What's the problem? I'm running this example in Visual Studio 2017.
The problem with line 31 is my project is named "MVCMusicStore". In the completed code I imported it's "MvcMusicStore". So it's looking at the wrong thing for the 'Album'namespace. Still don't know what causes the first error.
After correcting the namespace in the sample file, that error goes away and the new error is on the line;
#foreach (var item in Model{
the error is "System.NullReferenceException 'Object reference not set to an instance of an object.'
I have some HTML Helpers that I imported from an external project. How do I reference them within the ASPX file?
Currently I get an error similar to the following:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'System.Web.Mvc.HtmlHelper<LC.TLAdminMVC.DAL.BusinessObjects.CompanySingleViewModel>' does not contain a definition for 'Configurator' and no extension method 'Configurator' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<LC.TLAdminMVC.DAL.BusinessObjects.CompanySingleViewModel>' could be found (are you missing a using directive or an assembly reference?)
To better understand your situation can you answer one question.
Have you placed the helper methods inside the aspx files or are they external?
If they are external:
Make a directory in your solution named: app_code
Create a new file, whatever name (we'll call it 'Content')
When you want to use the helper method just call Content.methodName(params)
If they are internal:
Try checking if they are not nested inside a block.
Hope this helps,
I'm on about page 70 of the NerdDinner tutorial (MVC 1.0 version). It won't build at this point because it is saying the properties referred to in the GetRuleViolations (ie, Title, Description, etc) can't be resolved. I've compared my own project with the downloadable source code and can't figure out what is missing. The error VS 2008 is giving me is "The name 'Title' does not exist in the current context". I can see the declarations in the NerDinner.designer.cs file.
Did you make sure to import the namespace of the model type?