C# - Best Practice For Managing/generating Policy Numbers

Oct 19, 2010

I am currently working on a website which allows a prospect to generate a quote and purchase a policy. After they submit their payment the application should generate a policy number.

I was given a block of policy numbers to use incrementally. For this example, let's say 0100800 - 0100999. If I have two or more people who decide to purchase a policy at the same time, What are some best practices/algoithms to make sure I don't generate the same policy number for two or more people?

It's also possible that after the last available policy number 0100999, I may be given another block of policy number for example 0222100-0222399.

View 7 Replies


Similar Messages:

SQL Server :: Generating Numbers And Alphabet In Database?

Sep 22, 2010

How can i generate a mixture of Numbers and letter in the Database?

View 4 Replies

How To Make A UI With A Panel Of Numbers / Highlighted Numbers

Feb 15, 2011

I would like to to make a UI with a panel of numbers, and when hovered above one of them ten the number becomes larger. something like that:

[URL]

I want that when I press a numbers it shows it's value in some other textbox. In which .NET technology is it possible to do it? Windows Forms? WPF? other?

View 6 Replies

Configuration :: Deploy .net 4.0 With Group Policy?

Apr 16, 2010

I'd like a really simple way to deploy .net 4.0 with group policy. I tried the steps in [URL], but for some reason the installer won't unpack to my designated directory using the method outlined in the article.

I tried dotNetFx40_Full_x86_x64.exe /T:"Path to share" /C

There must be an easy way to do this which doesn't involve manually going to each computer in the organization.

View 1 Replies

VS 2008 Creating User Account Policy ?

Feb 20, 2011

I would like develop an application written in ASP.NET which include an option to configure user accounts in such a way that each user account can be freely assigned to a different module to which it will has access.

So, for example, I would have one table in a database that maps user to modules.

In ASP.NET there is the whole mechanism of roles, but his assumptions are slightly different -> Here you need to centrally configure finished profiles. This can be circumvented in such a way that each application module is a separate role. And for one user can be assigned multiple roles.

But whether such a method is elegant? Should I do it differently?

View 1 Replies

ASPX Pages Fail Due To FIPS 140 Security Policy?

Mar 18, 2011

I am working on a government site and am having some problems with my local security policy interferring with my web application. There is a setting called "System cryptography: Use FIPS 140 compliant cryptographic algorithms, including encryption, hashing and signing algorithms" which is enabled on my server.

Since that has been enabled, most of my aspx pages are returning the error "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms." These pages aren't accessing any cryptographic methods. They do communicate with another database server, but that's it.

My problem is similar to the one described here. However, I don't have the option of disabling this FIPS security setting.

I am using .NET 4.0, IIS 7.0, and Windows Server 2008 R2, if that matters. Has anyone encountered this problem before?

Update

Unfortunately, correcting the machine key element to use a FIPS compliant algorithm did not completely solve my problem. I am still getting the error on alot of my pages.

I found two hotfixes which may be related. I will try to install these and see what happens.

SQL Server Reporting Services R2 hotfix ScriptManager Control hotfix

View 1 Replies

C# - Code Access Security Policy - Deploying A Third Party Dll To Bin?

Oct 15, 2010

I'm working on a SharePoint solution which makes use of a third party dll (Telerik for Asp.Net Ajax - Telerik.Web.UI.dll) for rich experience. Since Telerik dll is a common assembly i have to deploy it to the bin folder of the webapplication instead of GAC. So here comes the problem.

WSPBuilder automatically deploys the dll to gac if the dll presents in the GAC folder. To deploy the telerik dll in bin i created the folder 80in and copied the dll there. I tried to build the wsp again and then went through the manifest.xml created. Great. The deployment target for the dll changed to WebApplication and wspbuilder was smart to create the cas policy itself.

<CodeAccessSecurity>
<PolicyItem>
<PermissionSet class="NamedPermissionSet" version="1" Description="WSPBuilder generated
[code]....

But Wspbuilder was not smart enough to put the four part name of SharePointPermission IPermission class. But i learnt that CAS actually requires the four part name. So i decided to make use of the -CustomCAS command line option of wspbuilder.exe to pass my custom cas policy file.

Here is my custom policy file -

<IPermission class="AspNetHostingPermission" version="1" Level="Minimal" />

<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Execute" />[code]....

After i deployed the wsp i verified

* the dlls going to bin

* the trust level changed to custom trust level

* custom policy file being added to config folder

But when i run the page i get the following error -

screen shot -

Error -Execution Permission Denied

I've checked my entire application for any assembly references of the dll. But i was not able to find one.

View 1 Replies

System.Security.Policy.PolicyException: Required Permissions Cannot Be Acquired

Apr 6, 2010

when i run my application i got this error like...

Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

View 1 Replies

.net - ScriptManager Be Made To Work With The Windows FIPS Security Policy?

Feb 19, 2010

If you enable the "Use FIPS compliant algorithms for encryption, hashing, and signing" security policy option in Windows, attempting to use many of the cryptographic classes in the .NET Framework will result in an InvalidOperationException. By default, ASP.NET uses AES to encrypt the ViewState blob, so it fails. You can work around this by adding a key like this to web.config:

<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/>

And that covers you for basic ASP.NET use. My problem is this: I have a large, complex ASP.NET web applications that makes heavy use of ScriptManagers (the foundation of ASP.NET AJAX) and needs to be deployed by a government customer who must enable this FIPS policy setting. Any ASP.NET page with a ScriptManager on it throws this exception:

[InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.]
System.Security.Cryptography.SHA1Managed..ctor() +3607454
System.Security.Policy.Hash.get_SHA1() +45
System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfoInternal(Assembly assembly) +85
System.Web.Handlers.ScriptResourceHandler.GetAssemblyInfo(Assembly assembly) +99
System.Web.Handlers.RuntimeScriptResourceHandler.GetScriptResourceUrlImpl(List`1 assemblyResourceLists, Boolean zip, Boolean notifyScriptLoaded) +525
System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(List`1 assemblyResourceLists, Boolean zip, Boolean notifyScriptLoaded) +910
System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +193
System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) +306
System.Web.UI.ScriptManager.RegisterUniqueScripts(List`1 uniqueScripts) +169
System.Web.UI.ScriptManager.RegisterScripts() +407
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +200
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +11041982
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3672

Even adding the <enforceFIPSPolicy enabled="false"/> element to web.config does not resolve the exception.

Is there any way to configure ASP.NET such that ScriptManager can be used with the Windows FIPS security policy?

View 3 Replies

Getting Exception / The Application Attempted To Perform An Operation Not Allowed By The Security Policy

Nov 10, 2010

i have an dll file which is data access layer of my application.

i am getting this exception while accessing databse

Description:

The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission contact your system administrator or change the application's trust level in the configuration file.

Exception Details:

System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

View 3 Replies

C# - Checking If User Created Password Matches Corporate Password Policy?

Sep 17, 2010

My company has some unique password policies (such as a pwd cannot be re-used for 6 months, aside from the must include #, special character, upper & lower case)Can anyone suggest how to go about ensuring that a new user's password complies with these policies (using forms authentication in .net 3.5 framework)?

View 2 Replies

Web Forms :: Security Exception - Application Attempted To Perform Operation Not Allowed By Security Policy

Apr 2, 2013

Error: 

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.Local its run fine. when i place in iis. it throw this exception.

View 1 Replies

VS 2008 Managing Session Myself

Mar 13, 2011

I am creating a web page that will pretty much persist - no postbacks - using jQuery.

I'm going to talk to the page with web services.

So I was thinking that when the user first gets the webpage I give them a GUID that they have to pass back to me with every future call to web services.

I'll simply save the GUID in a table in my MS SQL database and by grabbing that record from the db I could potentially get all my user specific data - user id - permission levels - whatever.

I can make the session row expire after like 10 hours - or something like that - so that they don't get the same session tomorrow simply by forgetting to close the browser window at the end of the work day.
..

View 2 Replies

MVC :: Managing Add Vs Edit Models?

Apr 22, 2010

I've half written an app which has just one model for adding and editing a particular entity.I am trying to embrace modelmetadata and where possible reduce my form code to just calls for EditorForModel. One of the key issues I am having it managing the
differences between a add and update scenario.

Take "User" editing for example, in an Add scenario I want "Password" to be a required field, in an update scenario I dont' want it to be a required field. The model-centric approach would have me create two models, one for adding and one for editing. My
edit model wouldn't have the Required attribute on the Password field. My feeling is this is going to create a bit too much plumbing.


Besides having a rather massive amount of automapping going on there is another more irrititating issue. Strongly typed views. I could... maybe see my way to having a different model for create and edit, using inheritance i could.. maybe mitigate the amount of code required. What I can't abide is having to have two seperate views, as I have already coding myself into a wall with strongly typed views I couldn't share add and edit (based on my understanding) scenarios with one view.

So anyway I was wondering what other peoplle are doing to manage this? Working with an outsourced (Indian) developers it would be great to make use of EditorForModel as I want them writing as little code as possible.

View 14 Replies

C# - Managing Unique Key For Cache?

Nov 1, 2010

I have to use cache multiple forms data that will be submitted on last form. I m not getting how to handle cache key as it should be unique. I want to use this key to get and put data in different forms. I considered to use GUID but it is very long to put in query string.

View 2 Replies

Managing ViewState In WebFormsMVP?

Aug 11, 2010

Currently we are using WebFormsMVP to allow better testability in our project. The framework does presenter binding in OnInitComplete and relies heavily on DataBind expressions e.g.

<asp:Label Text="<%#Model.FirstName%>" runat="server" />

As i understand above article this would put Model.FirstName into ViewState. Because databinding happens late during page lifecycle when viewstate tracking is already enabled.

One option would be to disable ViewState altogether. Are there any other? Remeber, we can't use OnInit or OnInitComplete, because OnLoad is the first event presenters can handle.

View 1 Replies

C# - Managing EntityConnection Lifetime?

Apr 4, 2010

There have been many question on managing EntityContext lifetime, e.g. http://stackoverflow.com/questions/813457/instantiating-a-context-in-linq-to-entitiesI've come to the conclusion that the entity context should be considered a unit-of-work and therefore not reused. But while doing some research for speeding up my database access, I ran into this blog post...Improving Entity Framework PerformanceThe post argues that EFs poor performance compared to other frameworks is often due to the EntityConnection object being created each time a new EntityContext object is needed.

To test this I manually created a static EntityConnection in Global.asax.cs Application_Start().
I then converted all my context using statements to
using( MyObjContext currContext = new MyObjeContext(globalStaticEFConnection)
{
....
}

This seems to have sped things up a bit without any errors so far as far as I can tell.But is this safe?Does using a applicationwide static EntityConnection introduce race conditions?

View 3 Replies

Managing Multiple Languages In A Web Application?

Apr 19, 2010

I am part of a development team building a new ASP.NET 3.5 web application. Two of us are C# coders, and the other is a VB.NET coder.

I know that we can mix languages on a per-project basis, and one can build classes in one language that inherit from classes written in the other language in a different project (which we are already doing), but I can see us getting into a situation where we might well end up with cyclic dependencies between our various project DLLs.

Other than simply having a high number of projects (more seperation of concerns into more libraries), how have you managed this situation on your own projects?

Note - I believe this question to be different enough from the only similar match I could find (this one) on the basis that we are not wanting to use different languages in order to take advantage of their specific features per se, but rather to make use of what developer resource is available to us (i.e. one dev just happens to be VB.NET only).

View 3 Replies

Managing Web.config For Teams In VS2010 & TFS?

May 28, 2010

With VS2010's mandate that web.config be included in the project, how do we allow everyone to keep their own custom config file without getting into source control problems?

Previously, we would simply leave web.config out of our project, allowing everyone to keep their own local version of web.config on their machine. We moved to VS2010, and it is now forcing me to add web.config to my project in order to run debug mode. Because our project is linked to TFS, it automatically adds web.config to source control and tries to maintain it that way.Is there a way to run in debug mode without including web.config in your project? Or is there a better way to manage config files?

View 6 Replies

Managing Concurrent Connections In IIS7?

Feb 8, 2011

I'm having an issue with my hosting provider (winhost.com). My app is built on ASP.NET 4 MVC 3. Up until a few days ago, everything was running fine. All of a sudden I've started getting 503 errors when trying to access my site (wikipediamaze.com). It doesn't happen all the time, just most of the time.

When someone starts playing the game a request is made to wikipedia.org to get the contents of the page for the current step in the puzzle. Basically I'm screen scraping wikipedia.org, injecting some html and then displaying the results. All of my web requests are closed immediately after receiving the data.

What winhost is telling me is that there are connections remaining open and causing any additional requests to the site to get the 503 Service Unavailable Error. What I can see from my end is that only 1 request is ever allowed to be made to wikipediamaze.com at a time. If you keep refreshing the page you'll eventually get the HTML but all subsequent requests (css,images,js) all get the 503 error. Even pages that don't ever call out to wikipedia.org.

If it was an issue with connection throttling in IIS, do both incoming and outgoing (requests made internally) fall in to the same bucket? If I'm sure all of my connections are being closed (and I've never had this issue before) what else could cause this?

View 1 Replies

SQL Server :: Creating And Managing A Database?

Dec 1, 2010

how I can create a Database in SQL Express, then add tables and columns .. etc to the Database.

On PHP & MySQL I use to go into PhpMyAdmin and do that all there ! However with SQL Server Express and Visual Studio 2010. how to do it.

View 3 Replies

C# - Managing Many To Many Relationships In Asp.net Wizard Control?

May 27, 2010

Say I have this entity with a lot of attributes. In the input form I have decided to implement a wizard control so I can collect information about this entity in several steps. The problem is that I need to collect information that has been modeled has many to many relationships. I am planning to use a telerik gridview to manage this (add/edit/delete), the problem is where do I store that data since the entity in a insert form is not created on the database yet. OK so I can store all that info in temporary lists residing in the viewstate, waiting for the final submit where I dump all that in the DB, but one of the steps I am collecting files...now storing files in the viewstate is out of the question, same as as storing them in the session...I have been thinking of implementing in a way that the user has to submit some info first (say first 3 steps), commit the data to the database creating the parent entity and then start inserting all the childs entities...but this will get weird as it's confusing since on the first steps you not saving the data to the DB and on the next ones you are commiting directly...

View 1 Replies

C# - Creating / Managing Users Remotely?

Mar 31, 2011

I've put my site online and I'm looking to add/change user membership. From Visual Studio, I can access the Website Administration Tool WSAT and it's great if you just want to add users manually. Is there a similar way to change users once the site is hosted on a remote server?For the moment, I change the user information through the WSAT and re-FTP the mdf file; it's pretty painful.

View 1 Replies

MVC :: Strategies For Managing Security Scope?

May 17, 2010

In this case I have a system where a user logs in, they get a dashboard and they can see all their related projects. The user can click on the project and open it. (ie /View/79) The problem the user can also just type /View/68 which they are not supposed to be able to view.

Obviously I am aware of how to filter my data, but this application has many many lists of data and it all needs to be scoped to data that user has been allowed to see. I can insert a plethora of joins and wheres in all my queries but.. it's a lot of work and a bit convoluted.So I was wondering what strategies other had used for filtering data based on the user scope.One approach I was thinking of was to extend my user-role-permission model so "permissions" could be assigned to various entitites (like projects). This way, rather than doing a series of joins etc to see confirm a user has been assigned to a project, my join is just onto the EntityPermission table to confirm the user has PermissionX (like: CanView) on that entity. I could either maintain a seperate M2M table for each entity i need to restrict or something a bit more general (but without referential integrity).

View 3 Replies

Configuration :: Managing A .net Site Across Multiple Servers

Mar 28, 2011

A friend and I manage a large website for a company. The site is build using Visual Studio 2005 and is a series of nested web applications run inside a master application employing nested master pages. Currently we have to manually move files around folders and FTP them to various servers and I am looking for a way to be able to manage the deployment end of the site in a more automated fashion. I'd like to be able to work on my local version of a project and once I'm done be able to hit one button and publish the site to our internal testing server and then when testing is complete hit another button to deploy it to the live web servers. Right now we have to manually navigate the windows folders and copy pages, css files, images, swfs, etc and FTP them manually. The driver for this is that we have a new junior develop starting and want to remove the manual aspect in advance of him starting.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved