Search Results

Search found 52899 results on 2116 pages for 'ado net'.

Page 60/2116 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Membership in ASP.Net applications - part 1

    - by nikolaosk
    So far in all my posts, I have never mentioned anything about how to implement authentication/authorisation mechanisms in a web site. In all our professional web applications we do need some sort of mechanism to verify who are users are and what privileges have in our site. This is the first post in a series of posts investigating how to implement membership (authentication+authorisation) in ASP.Net applications. We will look into the built-in web server security controls.We will look at the built...(read more)

    Read the article

  • March 2010 Meeting of Israel Dot Net Developers User Group (IDNDUG)

    - by Jackie Goldstein
    Note the special date of this meeting - Wednesday March 24, 2010 For our March 2010 meeting of the Israel Dot Net Developers User Group we have the opportunity for a special meeting with Brad Abrams from Microsoft Corp, who will in Israel for the Developer Academy 4 event. Our user group meeting will be held on Wednesday March 24, 2010 .   This meeting will focus on building Line of Business applications with Silverlight 4, RIA Services and VS2010. Abstract: Building Business Applications...(read more)

    Read the article

  • Porting .NET 3.5 app to Linux

    - by gregarobinson
    Started doing research on porting a .NET 3.5 Windows Service application to Linux last week and today.There is a WinForms maintenance\admin tool that needs to be ported too. Looking at Mono and related friends. Need to come up with a way to support MSMQ and Windows Workflow Foundation. Looks like the support for this in Mono is in alpha and not stable yet.   

    Read the article

  • Using Entity Framework Table splitting customisations in an ASP.Net application

    - by nikolaosk
    I have been teaching in the past few weeks many people on how to use Entity Framework. I have decided to provide some of the samples I am using in my classes. First let’s try to define what EF is and why it is going to help us to create easily data-centric applications.Entity Framework is an object-relational mapping (ORM) framework for the .NET Framework.EF addresses the problem of Object-relational impedance mismatch . I will not be talking about that mismatch because it is well documented in many...(read more)

    Read the article

  • ASP.NET MVC: Using ProfileRequiredAttribute to restrict access to pages

    - by DigiMortal
    If you are using AppFabric Access Control Services to authenticate users when they log in to your community site using Live ID, Google or some other popular identity provider, you need more than AuthorizeAttribute to make sure that users can access the content that is there for authenticated users only. In this posting I will show you hot to extend the AuthorizeAttribute so users must also have user profile filled. Semi-authorized users When user is authenticated through external identity provider then not all identity providers give us user name or other information we ask users when they join with our site. What all identity providers have in common is unique ID that helps you identify the user. Example. Users authenticated through Windows Live ID by AppFabric ACS have no name specified. Google’s identity provider is able to provide you with user name and e-mail address if user agrees to publish this information to you. They both give you unique ID of user when user is successfully authenticated in their service. There is logical shift between ASP.NET and my site when considering user as authorized. For ASP.NET MVC user is authorized when user has identity. For my site user is authorized when user has profile and row in my users table. Having profile means that user has unique username in my system and he or she is always identified by this username by other users. My solution is simple: I created my own action filter attribute that makes sure if user has profile to access given method and if user has no profile then browser is redirected to join page. Illustrating the problem Usually we restrict access to page using AuthorizeAttribute. Code is something like this. [Authorize] public ActionResult Details(string id) {     var profile = _userRepository.GetUserByUserName(id);     return View(profile); } If this page is only for site users and we have user profiles then all users – the ones that have profile and all the others that are just authenticated – can access the information. It is okay because all these users have successfully logged in in some service that is supported by AppFabric ACS. In my site the users with no profile are in grey spot. They are on half way to be users because they have no username and profile on my site yet. So looking at the image above again we need something that adds profile existence condition to user-only content. [ProfileRequired] public ActionResult Details(string id) {     var profile = _userRepository.GetUserByUserName(id);     return View(profile); } Now, this attribute will solve our problem as soon as we implement it. ProfileRequiredAttribute: Profiles are required to be fully authorized Here is my implementation of ProfileRequiredAttribute. It is pretty new and right now it is more like working draft but you can already play with it. public class ProfileRequiredAttribute : AuthorizeAttribute {     private readonly string _redirectUrl;       public ProfileRequiredAttribute()     {         _redirectUrl = ConfigurationManager.AppSettings["JoinUrl"];         if (string.IsNullOrWhiteSpace(_redirectUrl))             _redirectUrl = "~/";     }              public override void OnAuthorization(AuthorizationContext filterContext)     {         base.OnAuthorization(filterContext);           var httpContext = filterContext.HttpContext;         var identity = httpContext.User.Identity;           if (!identity.IsAuthenticated || identity.GetProfile() == null)             if(filterContext.Result == null)                 httpContext.Response.Redirect(_redirectUrl);          } } All methods with this attribute work as follows: if user is not authenticated then he or she is redirected to AppFabric ACS identity provider selection page, if user is authenticated but has no profile then user is by default redirected to main page of site but if you have application setting with name JoinUrl then user is redirected to this URL. First case is handled by AuthorizeAttribute and the second one is handled by custom logic in ProfileRequiredAttribute class. GetProfile() extension method To get user profile using less code in places where profiles are needed I wrote GetProfile() extension method for IIdentity interface. There are some more extension methods that read out user and identity provider identifier from claims and based on this information user profile is read from database. If you take this code with copy and paste I am sure it doesn’t work for you but you get the idea. public static User GetProfile(this IIdentity identity) {     if (identity == null)         return null;       var context = HttpContext.Current;     if (context.Items["UserProfile"] != null)         return context.Items["UserProfile"] as User;       var provider = identity.GetIdentityProvider();     var nameId = identity.GetNameIdentifier();       var rep = ObjectFactory.GetInstance<IUserRepository>();     var profile = rep.GetUserByProviderAndNameId(provider, nameId);       context.Items["UserProfile"] = profile;       return profile; } To avoid round trips to database I cache user profile to current request because the chance that profile gets changed meanwhile is very minimal. The other reason is maybe more tricky – profile objects are coming from Entity Framework context and context has also HTTP request as lifecycle. Conclusion This posting gave you some ideas how to finish user profiles stuff when you use AppFabric ACS as external authentication provider. Although there was little shift between us and ASP.NET MVC with interpretation of “authorized” we were easily able to solve the problem by extending AuthorizeAttribute to get all our requirements fulfilled. We also write extension method for IIdentity that returns as user profile based on username and caches the profile in HTTP request scope.

    Read the article

  • Back to Basics: Structuring a Web Page with CSS and ASP.NET

    Nick Harrison explains why such habits as using nested HTML Tables to position content in the right place on the browser page is bad practice and, nowadays, avoidable. This is just one 'Markup smell' that he discusses on the way to demonstrating the benefits of CSS Style-sheets and ASP.NET Master Pages. span.fullpost {display:none;}

    Read the article

  • Google Chrome Loses ASP.NET Sessions - Need FavIcon

    - by nannette
    I had programmed a brilliant web page in ASP.NET 4.0 and lo and behold, this one page lost its sessions in Google Chrome. I could run it locally in debug and could not reproduce the issues in Chrome. Didn't happen in IE or Firefox, only Chrome on the published server. I finally found in a forum where someone mentioned that Google Chrome looks for favicons and if it doesn't find one it will throw a 302 redirect and kill the session. http://stackoverflow.com/questions/8247842/session-data-lost-in-chrome...(read more)

    Read the article

  • Building an ASP.Net 4.5 Web forms application - part 3

    - by nikolaosk
    ?his is the third post in a series of posts on how to design and implement an ASP.Net 4.5 Web Forms store that sells posters on line.Make sure you read the first and second post in the series.In this new post I will keep making some minor changes in the Markup,CSS and Master page but there is no point in presenting them here. They are just minor changes to reflect the content and layout I want my site to have. What I need to do now is to add some more pages and start displaying properly data from my database.Having said that I will show you how to add more pages to the web application and present data.1) Launch Visual Studio and open your solution where your project lives2) Add a new web form item on the project.Make sure you include the Master Page.Name it PosterList.aspxHave a look at the picture below 3) In Site.Master add the following link to the master page so the user can navigate to it.You should only add the line in bold     <nav>                    <ul id="menu">                        <li><a runat="server" href="~/">Home</a></li>                        <li><a runat="server" href="~/About.aspx">About</a></li>                        <li><a runat="server" href="~/Contact.aspx">Contact</a></li>                          <li><a href="http://weblogs.asp.net/PosterList.aspx">Posters</a></li>                    </ul>                </nav> 4) Now we need to display categories from the database. We will use a ListView web server control.Inside the <div id="body"> add the following code. <section id="postercat">       <asp:ListView ID="categoryList"                          ItemType="PostersOnLine.DAL.PosterCategory"                         runat="server"                        SelectMethod="GetPosterCategories" >                        <ItemTemplate>                                                    <a href="http://weblogs.asp.net/PosterList.aspx?id=<%#: Item.PosterCategoryID %>">                            <%#: Item.PosterCategoryName %>                            </a>                            </b>                        </ItemTemplate>                        <ItemSeparatorTemplate> ----- </ItemSeparatorTemplate>                    </asp:ListView>             </section>        Let me explain what the code does.We have the ListView control that displays each poster category's name.It also includes a link to the PosterList.aspx page with a query-string value containing the ID of the category. We set the ItemType property in the ListView to the PosterCategory entity .We set the SelectMethod property to a method GetPosterCategories. Now we can use the data-binding expression Item (<%#: %>) that is available within the ItemTemplate . 5) Now we must write the GetPosterCategories method. In the Site.Master.cs file add the following code.This is just a simple function that returns the poster categories.        public IQueryable<PosterCategory> GetPosterCategories()        {            PosterContext ctx = new PosterContext();            IQueryable<PosterCategory> query = ctx.PosterCategories;            return query;        } 6) I just changed a few things in the Site.css file to style the new <section> HTML element that includes the ListView control.#postercat {  text-align: center; background-color: #85C465;}     7) Build and run your application. Everything should compile now. Have a look at the picture below.The links (poster categories) appear.?he ListView control when is called during the page lifecycle calls the GetPosterCategories() method.The method is executed and returns the poster categories that are bound to the control.  When I click on any of the poster category links, the PosterList.aspx page will show up with the appropriate Id that is the PosterCategoryID.Have a look at the picture below  We will add more data-enabled controls in the next post in the PosterList.aspx page. Some people are complaining the posts are too long so I will keep them short. Hope it helps!!!

    Read the article

  • Adding bindingRedirect element in web.config when upgrading from asp.net mvc 1 to asp.net mvc 2

    - by mallows98
    Hi all, I have got a question with regards to upgrading asp.net mvc applications from v1 to v2... I've noticed in the ASP.NET MVC v2 Release notes that we need to add this code (please see below) when upgrading, but it did not state what would be the purpose of it because I've tried experimenting some of my apps to asp.net mvc 2 without adding this particular section in web.config. <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> Would there be implications should I not place this? Thanks!

    Read the article

  • Asp.net ajax library preview 6 (Ajax toolkits inside a dataview)

    - by Thurein
    Hi, I was using the sys.ui.dataview, ado.net data services and a html page to provide an edit page. It was working fine, but when I wanted to apply some ACT features, for instance watermark or autocomplete on a textbox (input) within the dataview div, its not applied. However, when I move that text box, out of the div, it is working fine and the watermark effect was applied. Am I doing something wrong or any advice ? Thanks

    Read the article

  • What would cause ANY .NET application to crash immediately... except a project I create and Debug in

    - by blak3r
    My software recently got deployed to a customer who said that the application was crashing immediately after it started. After some initial debugging, the customer provided me remote access to one of the computers which was unable to run the application. I found that the crash wasn't specific to my application. Any application which depended on the .NET framework crashed immediately. Conveniently, Visual Studio 2008 was installed so I created a quick hello world application on it and clicked Debug. The application worked fine. But, then when I tried to execute the generated binaries in the /bin/Debug/HelloWorld.exe directory outside of visual studio it crashed. List of things i've tried (UPDATED): I checked that "Everyone" has Read&Execute permissions for c:\Windows. To test that the problem was with the .NET Framework (and not my application), I attempted to download Paint .NET on to the computers. The setup frontend crashed in the same manner. Performed a repair of the .NET framework as outlined in http://support.microsoft.com/kb/908077 (Boy was this fun and time consuming). No luck. Installed .NET 3.5 SP1 (before it just had .NET 3.5) Note: my application targets 2.0 so I did this more as a long shot... but i learned in the process that .NET 3.5 SP1 also updates the underlying frameworks. Ran Aaron Stebner's .NET Setup Verification Tool. This tool indicated that .NET was successfully installed. (I forget if i checked all the versions but at least 2.0 worked). Tested some mini hello world applications which were targeted for .NET 2.0 and .NET 3.5 and both crashed in the same way. Tried launching .NET apps via windbg cmd line. Doing this did allow me invoke my simple hello world applications. So, simple .NET hello world works when invoked by windbg or by launching via debug in visual studio... but doesn't if i try to execute it standalone. I created a dump file using WinDbg. It wasn't all that revealing to me. FAULTING_IP: mscorwks!PEImage::GetEntryPointToken+21 79f4ff9d f6401010 test byte ptr [eax+10h],10h EXCEPTION_RECORD: 0012f710 -- (.exr 0x12f710) ExceptionAddress: 79f4ff9d (mscorwks!PEImage::GetEntryPointToken+0x00000021) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 00000000 Parameter[1]: 00000010 Attempt to read from address 00000010 FAULTING_THREAD: 00000b44 PROCESS_NAME: MyProcess.exe ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid DETOURED_IMAGE: 1 NTGLOBALFLAG: 0 APPLICATION_VERIFIER_FLAGS: 0 MANAGED_STACK: !dumpstack -EE OS Thread Id: 0xb44 (0) Current frame: ChildEBP RetAddr Caller,Callee EXCEPTION_OBJECT: !pe cb10b4 Exception object: 00cb10b4 Exception type: System.ExecutionEngineException Message: <none> InnerException: <none> StackTrace (generated): <none> StackTraceString: <none> HResult: 80131506 MANAGED_OBJECT_NAME: System.ExecutionEngineException CONTEXT: 0012f72c -- (.cxr 0x12f72c) eax=00000000 ebx=00000000 ecx=00000000 edx=0000000e esi=001a1490 edi=00000001 eip=79f4ff9d esp=0012f9f8 ebp=0012fa1c iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246 mscorwks!PEImage::GetEntryPointToken+0x21: 79f4ff9d f6401010 test byte ptr [eax+10h],10h ds:0023:00000010=?? Resetting default scope READ_ADDRESS: 00000010 FOLLOWUP_IP: mscorwks!PEImage::GetEntryPointToken+21 79f4ff9d f6401010 test byte ptr [eax+10h],10h BUGCHECK_STR: APPLICATION_FAULT_NULL_CLASS_PTR_DEREFERENCE_SHUTDOWN PRIMARY_PROBLEM_CLASS: NULL_CLASS_PTR_DEREFERENCE_SHUTDOWN DEFAULT_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE_SHUTDOWN LAST_CONTROL_TRANSFER: from 79ef02b5 to 79f4ff9d STACK_TEXT: 79f4ff9d mscorwks!PEImage::GetEntryPointToken+0x21 79ef02b5 mscorwks!PEFile::GetEntryPointToken+0xa0 79eefeaf mscorwks!SystemDomain::ExecuteMainMethod+0xd4 79fb9793 mscorwks!ExecuteEXE+0x59 79fb96df mscorwks!_CorExeMain+0x15c 7900b1b3 mscoree!_CorExeMain+0x2c 7c817077 kernel32!BaseProcessStart+0x23 SYMBOL_STACK_INDEX: 0 SYMBOL_NAME: mscorwks!PEImage::GetEntryPointToken+21 FOLLOWUP_NAME: MachineOwner MODULE_NAME: mscorwks IMAGE_NAME: mscorwks.dll DEBUG_FLR_IMAGE_TIMESTAMP: 471ef729 STACK_COMMAND: .cxr 0012F72C ; kb ; dds 12f9f8 ; kb FAILURE_BUCKET_ID: NULL_CLASS_PTR_DEREFERENCE_SHUTDOWN_80000003_mscorwks.dll!PEImage::GetEntryPointToken BUCKET_ID: APPLICATION_FAULT_NULL_CLASS_PTR_DEREFERENCE_SHUTDOWN_DETOURED_mscorwks!PEImage::GetEntryPointToken+21 WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/MyProcess_exe/2_4_4_39/4a8a192c/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1 Followup: MachineOwner Edit 1:The event log details for this error say it's a .NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A097706)(80131506). Edit 2 (10-7-09): This issue is still active. Edit 3 (3-29-10): This update is to let everyone know that I never did successfully solve the problem. The customer who's machine this was on lost interest in solving it and just reimaged the machine :(. Thanks for all the contributions though.

    Read the article

  • Multi page forms on ASP.NET MVC

    - by Jay
    Hi, I have decided to use ASP.NET MVC to develop multi page (registration) forms in asp.net. There will be two buttons on each page that allows the user to navigate to the previous and next page. When the user navigates back to a page they recently filled out, the data should be displayed to them. I understand ASP.NET MVC should remain stateless but how should I maintain page information when the user navigates back and forth. Should I? Save the information to a database and retrieve information for each page change? save information to the session? Load all the fields and display only whats's needed with javascript? This registration form is going to be used in multiple sites but with different sets of questions (Some may be the same). IF performance is a main concern, should I avoid generating these forms dynamically? Jay

    Read the article

  • trying to decide between asp.net and jsp

    - by Amir
    Hey Guys, I am wondering if anyone can shed some lights on the situation. I am about to start a project and trying to figure out what solution is best to go with asp.net or java jsp pages I have personally worked alot with .net and am really happy with the framework and Visual studio as IDE I find it easy to work with and there is a massive community support behind .net, i can get alot done quickly I have not every written anything use java jsp, there will be a learning curve here , so my experience is limited here. however after seeing jira i am very impressed with its capabilities, it has changed alot since the old days ( java 1.2 ) that i used to work with, and the fact that it runs under linux is a huge plus, so i am trying to decide is the learning curve, worth the price ? so given the situation above what would you recommended? Thanks, Amir

    Read the article

  • Constructing an object and calling a method without assignment in VB.Net

    - by mdryden
    I'm not entirely sure what to call what C# does, so I haven't had any luck searching for the VB.Net equivalent syntax (if it exists, which I suspect it probably doesn't). In c#, you can do this: public void DoSomething() { new MyHelper().DoIt(); // works just fine } But as far as I can tell, in VB.Net, you must assign the helper object to a local variable or you just get a syntax error: Public Sub DoSomething() New MyHelper().DoIt() ' won't compile End Sub Just one of those curiosity things I run into from day to day working on mixed language projects - often there is a VB.Net equivalent which uses less than obvious syntax. Anyone?

    Read the article

  • Rewriting VB.NET Lambda experession as a C# statement

    - by ChadD
    I downgraded my app from version 4 of the framework to version 4 and now I want to implement this VB.NET lambda function statement (which works on 3.5) Dim colLambda As ColumnItemValueAccessor = Function(rowItem As Object) General_ItemValueAccessor(rowItem, colName) and rewrite it in C#. This was my attempt: ColumnItemValueAccessor colLambda = (object rowItem) => General_ItemValueAccessor(rowItem, colName); When I did this, I get the following error: Error 14 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? C:\Source\DotNet\SqlSmoke\SqlSmoke\UserControls\ScriptUserControl.cs 84 73 SqlSmoke However, when I downgraded the app from version 4.0 of the framework to 3.5 (because our users only hae 3.5 and don't have rights to install 4.0). when I did this, the reference to "Microsoft.CSharp" was broken. Can I rewrite the VB.NET command in C# using syntax that is valid in C# 3.5 as I was able to in VB.NET? What would the syntax be?

    Read the article

  • asp.net mvc deployment

    - by Casey
    I've been dealing with a legacy asp.net 2.0 web site that was originally setup to deploy everything (source uncompiled) to the target server. I've been looking at doing some major upgrades and want to move to asp.net mvc. I'm coming from mostly a Java background where we typically deploy everything inside of a Web ARchive (war file) and the application server takes it from there. Is there a similar concept in the .net world? Right now in my mvc test app, I just put the compiled code into the deployed bin folder and the rest of the script/view files there as well. From what I have been reading it seems that most use the Publish feature of VS.

    Read the article

  • Asp.net 4.0 site fails because no handler mapped with Classic appPool

    - by AndyV
    When I create a Asp.net app and flip the appPool to "ASP.NET v4.0 Classic" it fails with the following error: HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler. After some searching it seems to be the handler not mapping correctly for the Classic mode but I can't find out where or how to fix that. I have the full .Net 4.0 install with VS2010 and the app works fine if I flip the appPool to Integrated. Also, it's a Windows 7 machine (I'm having the same problem on a Vista box). Thanks in advance. Andy

    Read the article

  • Managing multiple .NET languages in a web application

    - by tomfanning
    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).

    Read the article

  • Python Django vs ASP.NET MVC

    - by eddyc05
    Hey guys ! i'm fairly new at web development scene and i was wondering if you guys can help me break up the pros and cons of using python django vs asp.net mvc besides the maturity level of its framework. I have intermediate experience with JAVA. As of right now, i'm leaning towards python but i just wanted to make sure i am making the right choice. I find myself limited with books available on asp.net web developments. I am aware that there is the storefront example on the official asp.net site. However, that tutorial was a little hard for me to follow. I've done a research around and was hoping python could be my next available choice. There are more tutorials available online for python anyways. What do you guys think??

    Read the article

  • ASP.NET MVC on IIS6

    - by Seb Nilsson
    Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6? I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S. So I was wondering on how you best build applications in ASP.NET MVC and make it easily available to deploy on both IIS6 and IIS7. Keep in mind that this is for standard web-hosts, so there is no access to ISAPI-filters or special settings inside IIS6. Are there anything else one should think about when developing ASP.NET MVC-applications to target IIS6? Any functions that doesn't work? UPDATE: One of the bigger issues is the thing with routes. The pattern {controller}/{action} will work on IIS7, but not IIS6 which needs {controller}.mvc/{action}. So how do I make this transparent? Again, no ISAPI and no IIS-settings, please.

    Read the article

  • Downloading a file in ASP.NET (through the server) while streaming it to the user

    - by James Teare
    My ASP.NET website currently downloads a file from a remote server to a local drive, although when users access the site they have to wait for the server to finish downloading the file until they can then download the file from my ASP.NET website. Is it possible to almost stream the download from the remote website - through my ASP.NET website directly to the user (a bit like a proxy) ? My current code is as follows: using (var client = new WebClientEx()) { client.DownloadFile(downloadURL, "outputfile.zip"); } WebClient class: public class WebClientEx : WebClient { public CookieContainer CookieContainer { get; private set; } public WebClientEx() { CookieContainer = new CookieContainer(); } protected override WebRequest GetWebRequest(Uri address) { var request = base.GetWebRequest(address); if (request is HttpWebRequest) { (request as HttpWebRequest).CookieContainer = CookieContainer; } return request; } }

    Read the article

  • Running BlogEngine.NET with ASP.NET MVC under same website?

    - by Raj Aththanayake
    Hi Can anyone please help me with this? I have a Windows 2008 server and MVC 2.0 site is hosted under IIS 7.0 root directory. The site works fine. I want to use the BlogEngine.NET with my site. For example if my mite name is http:// mysite.com (which is the root of IIS) and the blog should be http://mysite.com/blog/Default.aspx Is this possible? Can I create a sub virtual directory within my root (where the MVC 2 app is hosted) and run the ASP.NET BlogEngine.Net in it? Any ideas appreciated.

    Read the article

  • How to best integrate HTML/design with C# code in ASP.Net or ASP.Net MVC?

    - by LuftMensch
    We're working on a new ASP.Net site. The last major site we did was in classic ASP--the procedure we used there was to have the HTML completed first, then "bring it to life" with the ASP code. In the ASP.Net world, how does this work? I.e. how do the designers do their work if much of the mark-up is actually being generated by the server controls? We are also looking at ASP.Net MVC as a potential lightweight alternative. Would be very interested to know what was worked best for people in both scenarios in terms of working with the designers and integrating their work with the code.

    Read the article

  • Windows/.NET Load Distribution & Balancing

    - by andrewbadera
    Hi all, Is there a vetted Windows-friendly, or even .NET-native, load-distributing/load-balancing utility out there along the lines of HA Proxy? We have a .NET stack product, and the one piece that we step out of the stack is for load-balancing. We need something with configurable rules for distribution -- perhaps subdomain-driven -- that NLB alone doesn't seem to offer. If it integrates directly with .NET, or offers an exposed API callable by webservices, so much the better! Thanks in advance! Clarification: we need to logically part over boxes. This is not just a cluster/failover/replication scenario.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >