Search Results

Search found 54623 results on 2185 pages for 'net 4 0 beta 2'.

Page 95/2185 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • Asp.net cached objects staying in memory

    - by GordonB
    I have a asp.net web forms app that uses System.Web.Caching.Cache to cache xml data from a number of web services for 2 hours. webCacheObj.Remove(dataCacheKey) webCacheObj.Insert(dataCacheKey, dataToCache, Nothing, DateTime.Now.AddHours(2), Nothing) Every 90 minutes a Microsoft Search Server hits a particular (spider) page which calls the code to put the objects into the cache. The issue i have is that over a period of time, the memory usage of the application grows exponentially. Lets say that in a week, the memory usage of the application pool grows to over 1gb. I'm using IIS7 and no application pool recycling is currently enabled.

    Read the article

  • view state in ASP.NET MVC Application

    - by Shetty
    Hi, I have read that viewstate is not there in asp.net MVC application. I am doing model validation. Now if i have two text boxes on my page,and i am doing required filed validation for both of them in model. This validation is done on server side on click of a button. I will fill one text box and click on submit button. It does the validation and returns the result saying second field is required. At this time value of the first text box is retained. So can you tell me how this text box is retaining the value even after postback?

    Read the article

  • Using a Resource as an Attribute to a HTML Element in ASP.net

    - by Michael Stum
    I would like to have this piece of code in my .aspx file: <input class="ms-ButtonHeightWidth" type="button" name="BtnOK" id="Button2" value="Close" onclick="javascript:HandleOKButtonClick()" accesskey="<%$Resources:wss,okbutton_accesskey%>" /> Unfortunately, ASP.net doesn't seem to like that: An error occurred during the processing of /_layouts/MyPage/Info.aspx. Literal expressions like '<%$Resources:wss,okbutton_accesskey%>' are not allowed. Use <asp:Literal runat="server" Text="<%$Resources:wss,okbutton_accesskey%>" /> instead That doesn't work in this situation as that would mean nesting the Literal between the quotes of the accesskey attribute, which causes a "The tag contains duplicate 'ID' attributes" error. Is there a way to use a string from a resource without having to change the input to an asp:Button? I guess there has to be a way using <%=, but I don't know how I would address the resource itself?

    Read the article

  • asp.net forms authentication timing out after 1 minute

    - by user548929
    I'm using ASP.NET MVC 3 with the Authorize attribute, but it keeps kicking me to the logon page after 1 minute, but even though my expiration is set to a very high value, it times out quickly. I check the cookie in my browser and its still there and not set to expire until about a month later, and it's set to be persistent, so I'm not sure why it keeps booting me. It only happens on my published location, locally it works just fine. var ticket = new FormsAuthenticationTicket(username, true, 500000); var encryptedTicket = FormsAuthentication.Encrypt(ticket); var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket); cookie.Expires = ticket.Expiration; Response.Cookies.Add(cookie); web.config: <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="7200" slidingExpiration="false"/> </authentication>

    Read the article

  • Running ASP.NET MVC application behind a proxy with different root relative path

    - by Wiebe
    Hi All, I'm having trouble with paths in a ASP.NET MVC application that's running behind a proxy. Our IIS Application root path is for example http://server/MyApp/ meaning that all urls using the application root ("~/",Url.Action("MyAction","MyController")) are resolved to "/MyApp" Now we're running behind a proxy server that forwards all requests, but changes the application root to something like this: "/Secury/Proxy/RubbishUrl/MyApp" Because the original url is only available on the client, I thought of creating a cookie with the path prefix, and insert this before each generated URL on the server. Now the question is, what's the best location in code to modify each URL that's resolved/sent to the client (to resources, controller actions, images etc)? Every path in the application is resolved with the MVC methods (Url.Content, Url.Action etc).

    Read the article

  • Debugging ASP.NET Session State server issues

    - by Cleggy
    We have an application that runs over load balanced server instances, and therefore is configured to use the ASP.NET session state service, which is running on one of our DB servers. While both instances of our app can successfully connect to the state server, changes in session state data are not being reflected across both of them. FI, If I call Session.Add('SomeKey', SomeData) on Server A, this is not being reflected if I then try to access Session['SomeKey'] on Server B. Session.SessionID returns the same value on both servers, and I have checked that they are both using the same validationkey and decryptionkey values configured in the machinekey section of machine.config. I even tried specifying these values in the apps web.config. What other things should I be looking out for which may be causing these symptoms, and what steps can people recommend to help debug this issue?

    Read the article

  • Using Function return in global variable vb.net

    - by Cold Assassin
    Can't seem to figure out how to use a function return variable in global Dims example code: Public Class Main Dim Path As String = FixPath() Dim fixwrongtxt As String = Path & "tryme.txt" Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load FixPath() On_load() End Sub Private Function FixPath() As String Path = "C:\test" MsgBox(Path) //First Message Box' Return Path End Function Sub On_load() MsgBox(fixwrongtxt) //Second Message Box End Sub End Class when I run it all I get the first message box that contains "C:\test" and I click ok and on the second messagebox I get "custom.dll" with out the "C:\test" or "Path Return" What am I doing wrong? I know I can't use // in vb.net. I have also tried adding "FixPath()" under Sub On_load() but got same result. Also the reason I have to have these global is because I have around 30 Subs that refer to "Path" Variable... Thanks

    Read the article

  • How to access a nested MultiView control in ASP.NET

    - by Eden
    I have an asp.net page with a multiview control nested within another multiview control. In my code behind I'm trying to access the inner most multiview control to set it's ActiveViewIndex. The problem I'm having is that I don't seem to be able to access the control. It's not available directly via this.MySubMultiview. And attempts to use this.FindControl or this.MyOuterMultiView.FindControl doesn't work. Html: ... ... Code behind: MultiView multiAddress = (MultiView)this.MultiViewMain.FindControl("MultiViewAddress"); multiAddress.ActiveViewIndex = 1;

    Read the article

  • Converting ASP.NET MVC to n-Tiered Architecture

    - by Jeff
    I just built an application using ASP.NET MVC. The programmers at my company want to build all future modules using n-Tiered (Presentation Layer, Business Logic Layer, Data Access Layer) architecture. I am not the programmer and need to know why this makes sense? Do I have to completely rewrite the entire code or can it be converted? We are building an HRIS system with Business Intelligence. Somebody please explain why or why not this approach does or does not make sense.

    Read the article

  • question about System.Net

    - by backdoor
    hi all. when i use some code like this: System.Net.WebClient objClient = new WebClient(); string url = "http://google.com"; objClient.DownloadString(url); it takes some seconds to connection stablished and downloading starts... i reinstall my windows yesterday. before yesterday i havent this problem. some times when i reinstall my windows this problem occures. does anyboddy know why this problem occures?? thanks all and sorry for my bad english....

    Read the article

  • Stopping function on event in vb.net

    - by afilatun
    I have a vb.net application which does some processing. This processing can take a while. The application doesn't respond until the processing has ended and then it handle all events (such as click on buttons) that the user has done during the processing. I'd like to add a "Stop" button so that the user can stop the processing at some point. How can I do that? Could threading the processing (which is done in a function of the application) be a possible solution? I tried to add a button which change a boolean value and putting the code of the processing function inside a while statement based on that boolean value. However it doesn't work because the click event on the button is processed only after the end of the processing.

    Read the article

  • How to manually verify a user against the asp.net memberhip database

    - by Ekk
    I would like to know how I can verify a user's credential against an existing asp.net membership database. The short story is that we want provide single sign on access. So what I've done is to connect directly to the membership database and tried to run a sql query against the aspnet_Membership table: private bool CanLogin(string userName, string password) { // Check DB to see if the credential is correct try { string passwordHash = FormsAuthentication.HashPasswordForStoringInConfigFile(password, "SHA1"); string sql = string.Format("select 1 from aspnet_Users a inner join aspnet_Membership b on a.UserId = b.UserId and a.applicationid = b.applicationid where a.username = '{0}' and b.password='{1}'", userName.ToLowerInvariant(), passwordHash); using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ConnectionString)) using (SqlCommand sqlCmd = new SqlCommand(sql, sqlConn)) { sqlConn.Open(); int count = sqlCmd.ExecuteNonQuery(); sqlConn.Close(); return count == 1; } } catch (Exception ex) { return false; } } The problem is the password value, does anyone know how the password it is hashed?

    Read the article

  • Page inheritance in mixed asp.net Forms and MVC application

    - by Rising Star
    I'm working on a web application. One of my co-workers has written some asp.net forms pages. The page classes all inherit from BasePageClass, which of course inherits from the Page class. I wish to add some MVC controllers that I've been told need to use the same logic implemented in the BasePageClass. Ordinarily, I would want to inherit the functions in the BasePageClass in the controller classes, but this breaks the inheritance heirarchy. What is the best practice for solving this problem?

    Read the article

  • asp.net 3.5 on windows 2000

    - by SiC
    Hi, I am trying to get an ASP.net 3.5 site to run on a windows 2000 machine (not my idea!!!) but am having some problems. I have been working through copying required dlls from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 into my app bin directory. This succesfully got me past the "assembly not found" errors. However, I am now getting the error: "Compiler executable file csc.exe cannot be found". Does anyone know how I can fix this? It is primarily LINQ functionality I am looking to utilise. Many thanks!!

    Read the article

  • Getting Stored Procedure Information from .Net

    - by Ben
    Hi, I am trying to get some data relevant to a stored procedure (or funtion) back from a database using .Net. The first thing I need to be able to do, is get the stored proc from the database and turn it into string format. The information I need is: The return set of columns, tables used within the SP, Stored Procedures called from the SP. The only way of doing this at the moment that i can think of, is though parsing the text and looking for keyword matches. Is there a better way of doing this? Any ideas? Thanks.

    Read the article

  • Show friendly message on ASP.NET Ajax error

    - by balexandre
    You all know how annoying is this: I do have a log system and the correct error is well explicit there, but I want to give a better message to the user. I keep trying several ways but I'm using Telerik components and well jQuery and I ended up using both ASP.NET Ajax methods and jQuery, so I use function pageLoad() { try { var manager = Sys.WebForms.PageRequestManager.getInstance(); manager.add_endRequest(endRequest); manager.add_beginRequest(OnBeginRequest); manager } catch (err) { alert(err); } } as well $(document).ready(function() { ... } that alert(err) is never fired even upon OnClick events what's the best approach to avoid this message errors and provide a cleaner way? all this happens in <asp:UpdatePanel> as I use that when I didn't know better (3 years ago!) and I really don't want to mess up and build all again from scratch :( Any help is greatly appreciated Updated with more error windows after volpav solution

    Read the article

  • Copy Merge fIelds From one word document to another in VB.net

    - by MetaDan
    Hi, I'm editing a vb.net app for a mate and part of the requirements are to copy merge fields from one word document to another. I can copy them across using document.content.text but they come out as text (should've figured this i guess). I think i've got them selected by: Dim tDocFields As Microsoft.Office.Interop.Word.Fields tDocFields = tDocument.Content.Fields I'm then activating the doc i want to copy into and i think i need to then copy into that doc using the related word app. vDocument.Activate() vWord.Selection. ??? Insert() ??? Any pointers would be greatly appreciated... Am i on the right lines even?

    Read the article

  • ASP.NET - Update Dataset directly to DB

    - by karthik
    Hi, Description: I wanted to update dataset to database in Asp.NET. Instead of retrieving the entire table, I am retrieving only one record using the following statement :- select * from Products where ProductID=3 Now I wanted to update dataset directly in to DB by using following statements (DAP 4.1) db.UpdateDataSet(ds, ds.Tables[0].TableName, null, cmdupdate, null, UpdateBehavior.Standard); Questions Can I Retrieve only one row from DB while a lot of other records are there and update back using Adapter update? ( In other words, I am not selecting all records from table) I am using Data Application Block 4.1? It will work there right? If anyone can give example for update will be great ( with Procedures). Thanks Ka

    Read the article

  • Navigation properties not set when using ADO.NET Mocking Context Generator

    - by olenak
    I am using ADO.NET Mocking Context Generator plugin for my Entity Framework model. I have not started on using mocks yet, just trying to fix generated entity and context classes to make application run as before without exceptions. I've already fixed T4 template to support SaveChanges method. Now I've got another problem: when I try to access any navigation property it is set to null. All the primitive fields inherited from DB table are set and correct. So what I am doing is the following using (var context = MyContext()) { var order = context.Orders.Where(p => p.Id == 7); var product = order.Products; } in this case product is set to null. But that was not a case while using default code generator, it used to return real product object. Thanks ahead for any suggestions!

    Read the article

  • Using ASP.Net 4.0 for new Dev projects

    - by JBeckton
    I am currently in the early stages of developing a couple web applications, I have not written any code yet as I am still just gathering requirements and scoping things out. I want to target ASP.Net 4.0 winforms as the platform for these apps but I want to make sure there are no glaring issues with this new version before I commit. I understand that if I was porting an existing app from 2.0, 3.5 to 4.0 there may be issues but I am starting from scratch on these projects and plan to write these apps to support the new features of 4.0. Should I wait for the first service pack to come out? Just seems like more work to start with 3.5 now only to go back through and tweak things for 4.0 in just a few months or even before I finish the app. Our servers are Win 2K3 with IIS6 and MS SQL 2000, Should I expect any problems with VS 2010 and MS SQL 2000 in regards to Linq to SQL and EF?

    Read the article

  • Disable Drag&Drop of files in Richtextbox in .NET

    - by Jiri
    Hello, I use a .NET richtextbox and I want to have the EnableAutoDragDrop property set to True. This allows user to drag&drop text, rtf and images around etc. However, I need to process files dropped into the richtextbox myself - I do not want them to be embedded as OLE objects when they are dropped. How can I overcome this? Is there any way to delete embedded files from richtextbox? (I've found API DragAcceptFiles which doesn't work for some reason.) Thanks!

    Read the article

  • .NET System.Net.Mail messages are always being flagged junk, on internal server.

    - by jamone
    I'm using System.Net.Mail to send out a few emails. The emails are being sent by our internal mail server to local addresses. However all of the messages are going straight to junk in Outlook. The messages are being sent from valid email addresses. What would be causing our our servers to label it as junk? MailMessage msg = new MailMessage(); msg.IsBodyHtml = true; msg.Subject = subject; msg.Body = body; msg.From = new MailAddress(from); msg.To.Add(to); SmtpClient client = new SmtpClient(server, 25); client.Send(msg);

    Read the article

  • Using an IN clause in Vb.net to save something to the database using SQL

    - by Rob
    I have a textbox and a button on a form. I wish to run a query (in Vb.Net) that will produce a query with the IN Values. Below is an example of my code myConnection = New SqlConnection("Data Source=sqldb\;Initial Catalog=Rec;Integrated Security=True") myConnection.Open() myCommand = New SqlCommand("UPDATE dbo.Recordings SET Status = 0 where RecID in ('" & txtRecID.Text & "') ", myConnection) ra = myCommand.ExecuteNonQuery() myConnection.Close() MsgBox("Done!", _ MsgBoxStyle.Information, "Done") When I enter a single value it works but when I enter values with commas it throws an error: "Conversion failed when converting the varchar value '1234,4567' to data type int." Could someone please help me to solve this or if there is an alternative way? Many Thanks

    Read the article

  • Read a String as XML in .NET 2.0

    - by Chin
    I have a string that is coming from DB. I would like to read this as XML. String looks like below <settings> <setting name="OfferIDs" value="47,48,49,50,51,52,53,76,77,78,79" /> <setting name="someothersetting" value="" /> <setting name="anothersetting" value="" /> </settings> I would like get the value of OfferIDs as a string using VB.NET. Many Thanks in advance.

    Read the article

  • .NET "Timer" would block other method calls?

    - by Ricky
    Hi guys: In ASP.NET 3.5, we suspect a delegate triggering by a "Timer" will block other method calls. From logs, some function calls will wait for the finishing of the delegate and continue to work. Is it true? If yes, what workaround can I do? PS: The delegate contains codes to use WCF to retrieve data and the following code private void Replace<T>(ref IList<T> src, IList<T> des) { lock(src) { while (src.Count > 0) { GC.SuppressFinalize(src.ElementAt(0)); src.RemoveAt(0); } GC.SuppressFinalize(src); src = des; } } Thanks a lot.

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >