How To Restrict Class Usage

Mar 18, 2011

Is there a way to enforce a class only to be used in ASP.NET ? So that it can't be referenced in a WinForm app or throw exception when instantiated. Is there some kind of .NET class attribute for this purpose?

View 2 Replies


Similar Messages:

C# - How To Restrict A Data Annotation's Usage To A Particular Property's Data Type

Mar 31, 2011

I have a validation attribute that inherits from ValidationAttribute. However, the particular usage of this attribute applies to lists only (IEnumerable really). How can I specify the usage of this property to only be used with items that inherit from IEnumerabe?

View 1 Replies

C# - Link On Basic Of DataAccessBase Class And It's Usage?

Apr 28, 2010

Can someone please provide me link on Basic of DataAccessBase class and it's usage?

View 1 Replies

What Is The Usage Of Flush

Aug 17, 2010

I always have problem with the conception of flush who knows exactly what it means eg:

[Code]....

View 1 Replies

RedirectToAction Usage In Asp.net Mvc

Dec 6, 2010

i want to make some questions about asp.net MVC,actually,i am not familiar with web developing.

But,i am assigned for web part.we are using like this.first,we create get set
properties for person data

public class Person
{
public int personID {get;set;}
public string personName {get;set;}
public string nric {get;set;}
}

and then after login,we put data in that class and we use RedirectToAction method like this,

return RedirectToAction("profile","person",new { personID = Person.personID});

it's working normally,but,parameter are shown at URL,how i hide them and also can i hide action name?

View 2 Replies

ADO.NET :: Usage Of Datatable In Vb.net?

Oct 19, 2010

how we write this code of C# in vb.net .i want to right this code in vb.net

[Code]....

View 5 Replies

Usage Of Cpu And Outofmemory Exception - How To Fix It

Nov 27, 2010

We have a web application based on asp.net 1.1. We deployed it on a web server but there is a problem about it. In the webserver sometimes cpu usage is increasing to 100% and outofmemory exception is occuring.

I think there are some wrong code inside the project but i don't know where it's.

Now, i want hear your advices about how to find problem and what kind of codes make cpu usage increased.

View 2 Replies

How To Diagnose IIS Pushing The CPU To 100% Usage

Nov 15, 2010

I have a web server with more than a few ASP.NET sites running on it. Every so often, i notice that IIS is pushing the server's CPU to 100%. The sites share application pools, per .NET version they are running.

What i'm looking for is a way to be able to pinpoint which site it is that is doing this, using some tool. If that tool happened to get down into the code to show it, that would also be nice. If not, i'm happy just knowing which site is causing the issue.

I've already tried using ANTS. However, with ANTS you need to know which site it is, and then have it running and waiting on said CPU-crashing web app. Not perfectly ideal.

View 4 Replies

Captcha Code Usage In Asp.net

Jan 30, 2010

how to insert the "captcha code" and its validation process in vb asp.net.... i vave searched every were but i could nat get its code..atleast tel me is it possible to do so or not

View 1 Replies

C# - Csharp - Jquery - Looking For A Better And Usage?

Feb 14, 2010

i have a little problem about using jquery...(i reeally do not know jquery but i forced to use it)

i am using vs 2008 - asp.net web app with c# also i am using telerik controls in my pages also i am using sqldatasources (Connecting to storedprocedures) in my pages my pages base on master and content pages and in content pages i have mutiviews in one of the views(inside one of those multiviews)i had made two radcombo boxes for country and city requirement like cascading dropdowns as parent and child combo boxes. i used old way for doing that , i mean i used update panel and in the SelectedIndexChange Event of Parent RadComboBox(Country) i Wrote this code :

[Code].....

View 1 Replies

C# - How To Write Memory Usage Log

Nov 10, 2010

We got "out of memory" issue on production servers. What API can we use to get live memory (physical and managed) usage of the ASP.NET application?

PS: we're forbidden to profile memory with tools.

View 4 Replies

Purpose Of StringWriter - Usage?

Feb 18, 2010

i would like to know what the StringWriter Class is about and when we should use it.

View 2 Replies

Usage Of .net Server Controls In .net Mvc?

Dec 22, 2010

usage of asp.net server controls in asp.net mvc. The question is like can we use asp.net server controls in the asp.net mvc? If asp.net server controls cannot be used in asp.net mvc is it a limitation of asp.net mvc model? If it is a limitation then how to use more number of controls(like asp.net server controls)

I have a question in the controller like, controller defines controllerActions. If the controller action method is non-action method, then how to call that nonaction method?I have one more question like, usage of HTTPPost in mivc?can we have a button click action without a HTTPPost attribute to my controlleraction method?

View 4 Replies

Web Forms :: XML Usage For DropDownList?

May 30, 2012

How to create a xml page for a dropdownlist and use it in asp.net.

View 1 Replies

W3wp.exe Has High Cpu Usage On Every Request?

Oct 26, 2010

I'm running a Windows 2008 server (a VPS with 1GB of RAM), with SQL Server Express and IIS 7 installed. On it I'm hosting a NopCommerce 1.7 website, with a database of around 26 000 products.

Right now I'm the only user of the website (it's in development) and I'm getting rather bad performance from it. To be more specific every time I make a request, the worker process goes to 90-100% CPU usage for a few seconds. Is it me or this is a lot for a 1 user NopCommerce website?

PS: the worker process uses between 100MB-400MB of memory (private working set), and SQL Server with this database, around 160MB.

View 2 Replies

CPU Usage Relative To Number Of Users?

May 1, 2010

My Asp.net application uses 25-30% of the CPU on a test server which has 600 MB Ram on it.

I can see the asp_wb process taking that much percentage of CPU.

This is when I am testing using one user.

How many users can the server afford then without falling over?

Is there a relationship between the CPU Usage and number of user aka if there are 2 users my application will sky rocket to 60% of memory usage?

View 1 Replies

Web Application Is Locked Up And CPU Usage Reached To 100%

Dec 28, 2010

We have a web application running which having around 100 users logged in, All clients are connected to server using websync. I was having requirement for keeping the session always live, so I am regenerating session when it is about to expire.

But after 3 or 4 days, I found cpu reached to 100% and application locked, then we need to restart the server to make it working.

View 3 Replies

100% CPU Usage In Xml/xslt Driven Web App - How To Optimize

Feb 25, 2010

The web app uses XML from a web service, which is then transformed to HTML using XSLT. The app uses a HttpModule to get the XML using AddOnPreRequestHandlerExecuteAsync.

Classes Used:

XmlDocument - stores the xml.
XslCompiledTransform - stores the transform, is cached in Application.
Asynchronous HttpWebRequest using BeginGetResponse/EndGetResponse
HttpModule with hooked AddOnPreRequestHandlerExecuteAsync events.

I do not want to use the XPathDocument unless there are no other possible optimizations. It would take some complicated code to get all the XML together without the ability to write to the XmlDocument. There is additional XML that does not come from the web service that must also be added to the document.

View 4 Replies

What Is Normal Memory Usage Of A Mvc Website

Feb 16, 2011

I have really tried to Google it but only articles about how to troubleshoot memory issues come up. Before I start to troubleshoot, I would like to know if my web site's memory usage is really abnormal or not.

So it is an asp.net mvc 2 website that runs on IIS 7.5 in production. I guess normal memory usage depends upon traffic, so here are the numbers of an average day:

300 unique visitor
400 visits
3000 page views

I would be really happy to get some idea how much is the normal memory usage for this traffic. Also I would be curious to know how memory usage normally increases with traffic growth.

View 1 Replies

The Usage Of HttpHandlers And Generic Handlers?

Jan 10, 2011

I have a bit confusion about the Http Handlers,Generic Handlers and the usage of those two.

View 1 Replies

Correct Usage Of Response.Write() In C#?

Jan 3, 2011

I am trying to force a download of an XML file when the user visits a page.

This is the code I am using

public partial class GenerateTemplate : LayoutsPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
//.............
//Going about generating my XML
//.............
Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=template.xml");
Response.Write(xmlDoc.InnerXml);
Response.Flush();
Response.Close();
}
}

I am facing a problem that my download window hangs indefinitely, without ever completing the download/Open of the file.

What am I doing wrong? Am I not disposing any objects or closing any connections here?

View 4 Replies

Web Forms :: Usage Of Iframe In Project?

Sep 14, 2010

I want to use an iframe in my project.. I'm using Visual Studio 2005 using asp.NET and VB.. I created the iframe okay.. but here's the tricky part.. I have a variable in the VB CODE called "htmladdress" and from the VB CODE i wish to do the following example:

[Code].... how either I access the iframe from the VB CODE (preferably) or access the variable from the asp code.

View 4 Replies

Dispose Data Context After Usage?

May 20, 2010

I have a member class that returned IQueryable from a data context

public static IQueryable<TB_Country> GetCountriesQ()
{
IQueryable<TB_Country> country;
Bn_Master_DataDataContext db = new Bn_Master_DataDataContext();
country = db.TB_Countries
.OrderBy(o => o.CountryName);
return country;
}

As you can see I don't delete the data context after usage. Because if I delete it, the code that call this method cannot use the IQueryable (perhaps because of deferred execution?). How to force immediate execution to this method? So I can dispose the data context..

View 2 Replies

.net - Entity Framework ObjectContext Re-usage?

Apr 27, 2010

I'm learning EF now and have a question regarding the ObjectContext: Should I create instance of ObjectContext for every query (function) when I access the database? Or it's better to create it once (singleton) and reuse it? Before EF I was using enterprise library data access block and created instance of dataacess for DataAccess function...

View 5 Replies

Common Usage Are Page Methods In 4?

Mar 4, 2011

How common usage are Page Methods in ASP.NET 4?I would like an example of how it's used (not a code sample).

View 3 Replies







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