|
i read a article on DDD and also read one on onion architecture from csharpcorner. some how i felt both are same but have different name only.
please some one let me know your thought. if there is any difference then please mention in details. thanks
|
|
|
|
|
I wonder whether this post is a bit misplaced.
Nevertheless, I'm just in a middle of reading Eric Evan's book and I see DDD as a much broader concept than onion architecture. The second one stands for how you organize your application components. Although DDD also to some extent operates with those components and also advocates some patterns (side-effect free functions, specification pattern, bounded-context etc) I would say that the crucial idea behind DDD is a ubiquitous language which is formed by close cooperation between domain experts (here is where the name comes from) and developers.
|
|
|
|
|
I think its same, but I am not very sure about it.
|
|
|
|
|
i am familiar with OAuth but not with open id.
Nowadays many web site allow us to login to their site with facebook, linkedin etc. so when we click on facebook image then we redirected to facebook login page where we provide our facebook credential. if credential is right then facebook redirect us to first site. the advantage is we do not have to create & remember many credentials rather remember one.
but i do not know what is open id and how it works? i read this article http://www.devcurry.com/2012/11/aspnet-mvc-4-external-login-using-openid.html
it seems that in case of both open id and oauth user create their login to external site and user use that credential to other web site to login. if it is right then oauth and open id both are same and doing same purpose. so where is the difference?
please discuss how open id is different from oauth in terms of flow ?
|
|
|
|
|
|
i have seen a forum stackoverflow where user can login with openid and oauth to post their question.
in both case 3rd party validate user and send a token to stackoverflow to get access.
so how we can say openid is authentication system and oauth is authorization system because in case of stackoverflow access both does the same thing.
looking for further discussion. thanks
|
|
|
|
|
Mou_kol wrote: openid is authentication system and oauth is authorization system because in case of stackoverflow access both does the same thing.
No. they're not the same. Again, OAuth is basically a protocol that supports authorization workflows. What this means is that it gives you a way to ensure that a specific user has permissions to do something and that’s it.
OAuth isn’t meant to do stuff like validate a user’s identity — that’s taken care of by an Authentication service (e.g login with Facebook, Google, any other form of OpenID credentials or your own custom authentication service). Authentication is when you validate a user’s identity (like asking for a username / password to log in) -- that's what an OpenID, whereas authorization is when check to see what permissions an existing user already has.
It just that SO is an OpenID provider and as well as an OAuth2 Consumer: Stack Exchange is an OpenID Provider - Stack Overflow Blog[^]
|
|
|
|
|
Is there any Architecture similar to asp.net boilerplate?
|
|
|
|
|
How to process master detail JSON with WCF?
I would like to know, is there any guide on how to create WCF to process master detail JSON and insert it into SQL Server database?
|
|
|
|
|
How to Use Entity Framework Code?
|
|
|
|
|
Start by studying the documentation and online tutorials.
|
|
|
|
|
|
Hi,
I am using WCF Service to get data from Entity Framework, I am getting the following error while I am trying either trying to get data from service or while converting the returned data into jSon, its a huge list with more than 200K records each record might be of size 20 columns.
public ActionResult FDER_Read([Kendo.Mvc.UI.DataSourceRequest] Kendo.Mvc.UI.DataSourceRequest request)
{
using (ReportsClient reportclient = new ReportsClient())
{
CommonFunctions.IgnoreCertificationErrors();
try
{
var data = reportclient.GetFDER(GetCurrentFiscalPeriod(), GetCurrentUser());
var serializer = new JavaScriptSerializer();
var result = new ContentResult();
serializer.MaxJsonLength = Int32.MaxValue;
result.Content = serializer.Serialize(data.ToDataSourceResult(request));
result.ContentType = "application/json";
return result;
}
catch (Exception ex)
{
throw ex;
}
}
}
I have set the bindings to support max values I am not sure what am I missing?
Here is my ASP.Net MVC applications Web Config
<binding name="CustomBinding_IReports" closeTimeout="00:25:00" openTimeout="00:25:00" receiveTimeout="00:25:00" sendTimeout="00:25:00"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" >
<security defaultAlgorithmSuite="Default" authenticationMode="SspiNegotiated"
requireDerivedKeys="true" includeTimestamp="true" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireSignatureConfirmation="false">
<localClientSettings detectReplays="true" />
<localServiceSettings
replayCacheSize="800000"
detectReplays="true"
replayWindow="00:05:00" />
</security>
<textMessageEncoding>
<readerQuotas maxDepth="32" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646"/>
</textMessageEncoding>
<httpsTransport maxReceivedMessageSize="2147483647" authenticationScheme="Negotiate"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" />
</binding>
Here is my WCF Service Web Config
<binding name="crsSecureHttpBinding"
maxConnections="100"
closeTimeout="00:30:00"
openTimeout="00:30:00"
receiveTimeout="00:30:00"
sendTimeout="00:30:00"
transactionFlow="false"
transferMode="Buffered" maxDepth="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647"
maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" >
<transactionFlow />
<security>
<localServiceSettings replayCacheSize="8000000" replayWindow="00:30:00" />
</security>
<textMessageEncoding>
<readerQuotas maxDepth="32" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646"/>
</textMessageEncoding>
<httpsTransport maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" authenticationScheme="Negotiate" />
</binding>
The size of the returned object is: 96479088 and number of records are: 196411
I am not understanding what am I missing. I defined the Service and End point behaviors, any help would be greatly helpful, thanks in advance - please.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 7-Mar-18 19:54pm.
|
|
|
|
|
That's a lot of data to return in a single request. But are you sure the error is caused by the size of the response, and not something else? I couldn't see the error details in your question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I have a markup page that was using CommandField delete button. This was later replaced with regular button control.
Code:
<table>
<tr>
<td>
<asp:gridview ID="Gridview1" RowStyle-Wrap="false" gridlines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="Gridview1_RowDeleting">
<Columns>
<asp:BoundField DataField="RowNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtsourcename" placeholder="Name...(e.g, Jane Doe)" runat="server" style="width:375px;" AutoPostBack="true" class="form-control textClass" OnTextChanged="txtsourcename_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="grid1Details" ClientIDMode="Static" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="Grid1CheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtsourceaddress" placeholder="Address..." runat="server" style="width:375px;" class="form-control textClass"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="ButtonAdd" runat="server" Text="Add"
onclick="ButtonAdd_Click" CssClass="grvAddButton" /><br /><br /><br>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="sourceDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:CommandField ShowDeleteButton="True"><ControlStyle CssClass="grvDelButton" /></asp:CommandField>--%>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
The delete button is used to delete any additional / unwanted rows created in dynamically generated row in GridView.
Since the commandField delete button was replaced, the VB the engineers the delete action is now throwing an error:
Unable to cast object of type 'System.Web.UI.WebControls.TemplateField' to type 'System.Web.UI.WebControls.CommandField'
Does anyone know how to modify this to reflect the button control ID used in markup instead of CommandField?
Protected Sub GrvSource_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.Header Then
If e.Row.RowIndex = -1 Then
DirectCast(DirectCast(e.Row.Cells(4), DataControlFieldCell).ContainingField, CommandField).ShowDeleteButton = False
End If
Else
If Convert.ToInt32(ViewState("rowIndex" & 0)) = e.Row.RowIndex Then
DirectCast(DirectCast(e.Row.Cells(4), DataControlFieldCell).ContainingField, CommandField).ShowDeleteButton = True
End If
End If
End Sub
Thank in advance
|
|
|
|
|
You don't need to worry about the header row, since the ItemTemplate doesn't apply there.
So that just leaves the Else block, which is toggling the button's visibility based on a condition. You can do the same thing with a data-binding expression.
Something like this should work:
<asp:Button ID="sourceDelete" runat="server"
...
Visible='<%# Convert.ToInt32(ViewState("rowIndex" & 0)) = Container.DisplayIndex %>'
/>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
You always come up with the simplest, easy to understand solutions.
Thank you very much.
As I understand, I need to trash the VB portion of the code and just use the Visible='<#...))
If so, the delete button is still visible.
It needs to be invisible until the Add button is clicked.
|
|
|
|
|
How can I create an organisational chart and be able to click it and see information on it?
|
|
|
|
|
I suggest you look a Visio for drawing the organizational chart. Then consider using VBA which can be invoked on a shape to get more detailed information.
Visio VBA reference
Good luck
|
|
|
|
|
HI,
i want to return token if user is valid but i do not want to use identity to generate token. so please guide me how to achieve it or redirect me to any relevant article which show me how to generate token without identity or membership etc.
thanks
|
|
|
|
|
Are you authenticating completely out of band with ASP.NET? I'm trying to figure out how you would apply privileges in that scenario, and failing.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
i asked this question out of my curiosity. i like to know is it possible or is it mandatory that some one need to use identity because i am working with old version of asp.net mvc project then how can i generate token where identity does not exist.
thanks
|
|
|
|
|
The .NET ecosystem comprises of 3 major high-level components, namely .NET Framework, .NET Core, and Xamarin.
The .NET Framework is used to create Windows applications using WPF and Windows Forms and Web applications making use of ASP.NET MVC.
How .NET Core fits in the .NET Ecosystem?
|
|
|
|
|
pls send add to cart code in asp.net using sql server
|
|
|
|
|
No. If you want some code written then you need to write it. Alternatively you could use Google or Bing and do some searching for yourself.
|
|
|
|