|
Yep, I would leave the IdentityDbContext alone as it is used internally for Identity Framework. You should use your own DbContext for your database. I would recommend one dbcontext for one db.
|
|
|
|
|
Nathan Minier wrote: The important part is that the DbContext implements both the repository and UoW patterns,
Isn't it the DbSet that acts as the repository?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That's a fair question, and would certainly jive with some of the patterns I've seen built around EF.
My take on it is that a repository is not constrained to a single business object, especially in a relational setting where changes to object state can influence relations, so the DbContext is the repository. The functionally important part (to me) is that changes are tracked by the context, not the sets, and that multiple sets can have simultaneous changes tracked by the context.
This is entirely my personal opinion, I know, but from a design standpoint it makes a lot more sense to me.
Reading it again, I did make a mis-statement on the "implement UoW" part. "Supports UoW" would have been a much more appropriate statement, as it's entirely contingent on how you actually use the context.
|
|
|
|
|
Hi All.
I Create a website in this the login control connect to my SQL server (in the same machine) to verify user name and passs....
The connectionstring
<add name="RNOCDBConnecRNOCDB" connectionstring="Data Source=RNOCDB\;Initial Catalog=RnocDB;Integrated Security=True" providername="System.Data.SqlClient">
When I Run
http://localhost:4212/Default.aspx
It OK
But if I change the localhost by the server IP it has error:
Server Error in '/RNOC' Application
Login failed for user 'RNOC\RNOCDB$'.
|
|
|
|
|
Looks like you are not able to connect to your SQL server in hosting. Is the server from hosting company? Are you able to connect to it using SSMS?
|
|
|
|
|
Does your db sever require credentials?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I am not sure but I Config IIS Identity to Local System and it work.Thanks all.
|
|
|
|
|
I have a ASP.net page with an update panel triggered by a few imagebuttons (outside the updatepanel). All works OK.
Starting the page through a rewritemap.config however the imagebutton click is not executed, it becomes active but the click is not fired anymore.
I now do not know how to continu troubleshooting this problem, can anyone help me? Or provide a link where to look for more information?
Thanks in advance
Erik
|
|
|
|
|
|
Hello John,
The link provided the answer:
after a Form.Action = Request.RawUrl at page startup the problem was solved.
Thank you very much,
Erik
|
|
|
|
|
|
Let's say you have an individual user authentication scheme on a MVC5 app. Two part question:
0) When a user tries to browse directly to a controller action that is not specifically marked with the AllowAnonymous attribute, will the user automatically get redirected to the login page, or do I have to code it to do so?
1) Is the Authorize attribute involved? If so, where do I put it - on the controller or on the individual actions?
(The MVC5 app template does not provide an example of how this is done, or if it does, I haven't discovered it.)
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Nevermind - I found the answer (and it is by using the Authorize attribute.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
0) When a user tries to browse directly to a controller action that is not specifically marked with the AllowAnonymous attribute, will the user automatically get redirected to the login page, or do I have to code it to do so?
You don't have to do anything. When a controller or action is decorated with [Authorize] attribute then the ASP.NET automatically redirects the user to login page if the user is not already logged in.
1) Is the Authorize attribute involved? If so, where do I put it - on the controller or on the individual actions?
If your all actions in a controller to be authorized then it makes sense to put the [Authorize] attribute at controller level. If you have to leave at least of one of actions to be [AllowAnonymous] then obviously you have no option other than doing it at action level.
Hope this makes sense
modified 23-Mar-16 9:45am.
|
|
|
|
|
i am familiar with form authentication. so please point out some difference between form authentication and claim authentication.
why people use claim authentication instead of form auth ?
in case of form auth a auth cookie is saved in client pc which pass to server for next subsequent request and check at server side which ensure user is authenticated or not.
so in case of claim authentication what kind of into is stored at client pc ?
please share the knowledge in detail and if any good write up exist on it then please redirect me there. thanks
tbhattacharjee
|
|
|
|
|
|
i searched google and found not a single link which will discuss difference between form authentication and claim authentication.
can you please give few relevant link which discuss the difference between form authentication and claim authentication. thanks
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: i searched google and found not a single link So what did you search for? Did you bother to click on the link I gave you, and follow through to the MSDN article at the top?
|
|
|
|
|
your link is only saying what is claim but i am looking for difference between form authentication and claim authentication.
thanks
tbhattacharjee
|
|
|
|
|
|
<pre lang="C#">Hey people, i have deadline to submit the project in a week. Unable to solve it. Please write a code for this... My project statement goes like this....
RTTC being a training centre imparts various training programs/ schedules for student
community & BSNL staff. Courses offered are Industrial Visit, In-plant training, 2 weeks/4
weeks batches for BSNL staff & customized courses. Staff members of RTTC are specialized &
have expertise in domains like Mobile technology, Transmission, Fibre optic communication, IT,
Networking, Electrical maintenance & Accounting. The basic requirement is on selection of a
particular topic, soft module should suggest a list of faculty based on their availability in a
particular day & time.
This module is meant for designing of time table efficiently without any errors. Since it is
done manually, without checking the lecture availability & other class schedules errors may
occur. Some of the specific requirements are listed below, if felt while designing the soft module,
enhancements may be added by the student.
Proposed features:
1) Provision for input a course & course duration, say from and to date & number of classes
per day.
2) On preparing the time table, initially the system should take into account of Sundays &
holidays.
3) Front end tool should provide flexible & more user-friendly.
4) Provision to input master data (Staff name, expertise topics in the order of preference)
5) Provision to input subjects & time period in a day, subsequently based on subject, system
should suggest lectures.
6) System should consider the other schedules already assigned for other courses.
7) System should take into consideration of staff leave & their availability.
8) Provision should be made for accessing the timetable to all faculty staff.
9) Should support for taking reports.
What I have tried:
I have tried using visual studio</pre>
|
|
|
|
|
Sure, what I'll do is take hours and hours out of my day to spend my time writing your coursework. Given that you have no understands of even the basics, I don't doubt that the fruits of my hours' of labour will simply be "It doesn't work", meaning I will need to spend hours and hours more hand-holding you through getting it implemented. My main motivation for doing this is so you can get a qualification you don't deserve as you don't have the knowledge for it, in the hopes that one day you'll be a colleague of mine and I'll continue to have to do your work for you, as well as my own.
|
|
|
|
|
I started a reply to voice my irritation, but realized that you had covered all the bases already in a highly concise manner. Thank you.
|
|
|
|
|
Hey people, i have deadline to submit the project in a week. Unable to solve it. Please write a code for this... My project statement goes like this....
RTTC being a training centre imparts various training programs/ schedules for student
community & BSNL staff. Courses offered are Industrial Visit, In-plant training, 2 weeks/4
weeks batches for BSNL staff & customized courses. Staff members of RTTC are specialized &
have expertise in domains like Mobile technology, Transmission, Fibre optic communication, IT,
Networking, Electrical maintenance & Accounting. The basic requirement is on selection of a
particular topic, soft module should suggest a list of faculty based on their availability in a
particular day & time.
This module is meant for designing of time table efficiently without any errors. Since it is
done manually, without checking the lecture availability & other class schedules errors may
occur. Some of the specific requirements are listed below, if felt while designing the soft module,
enhancements may be added by the student.
Proposed features:
1) Provision for input a course & course duration, say from and to date & number of classes
per day.
2) On preparing the time table, initially the system should take into account of Sundays &
holidays.
3) Front end tool should provide flexible & more user-friendly.
4) Provision to input master data (Staff name, expertise topics in the order of preference)
5) Provision to input subjects & time period in a day, subsequently based on subject, system
should suggest lectures.
6) System should consider the other schedules already assigned for other courses.
7) System should take into consideration of staff leave & their availability.
8) Provision should be made for accessing the timetable to all faculty staff.
9) Should support for taking reports.
What I have tried:
I have tried using visual studio
|
|
|
|
|
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think.
If you only have a week to go, then consider this an exercise in time management: if you procrastinate for long enough, you have to work 24 hours a day, 7 days a week to get you work done in time.
We are not here to get you through your course without having to learn anything: so unless you pull your thumb out and get stuck in, a failing grade is what you are going to get, and exactly what you will deserve.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|