Jump to content
Xtreme .Net Talk

jesus4u

Avatar/Signature
  • Posts

    47
  • Joined

  • Last visited

Personal Information

  • Occupation
    Web Developer / Programmer

jesus4u's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. yep thanks
  2. Where is the ability to create a Watch condition and break when a value is true? thanks
  3. In code how do I retrieve my Exe's name? Thanks
  4. yep I agree
  5. I am not explicitly using Option Strict on so is it on by default then? Thanks
  6. I seemed to figure it out. Still don't CLEARLY understand why though ;) <WebMethod()> _ Public Function HelloWorld() As ArrayList If Context.Cache("strArray") Is Nothing Then CreateCache() End If Dim arrReturnList As ArrayList = CType(Context.Cache("strArray"), ArrayList) Context.Cache.Remove("strArray") Return arrReturnList End Function <WebMethod()> _ Public Sub FillCache(ByVal strValue As String) If Context.Cache("strArray") Is Nothing Then CreateCache() End If strArray = CType(Context.Cache("strArray"), ArrayList) strArray.Add(strValue) Context.Cache.Add("strArray", strArray, Nothing, Now.AddHours(1), Nothing, Caching.CacheItemPriority.High, Nothing) End Sub Private Sub CreateCache() strArray.Add("StarterValue") Context.Cache.Add("strArray", strArray, Nothing, Now.AddHours(1), Nothing, Caching.CacheItemPriority.High, Nothing) End Sub
  7. I am trying to add an array list to a cache object in my WebService. But it only loads the first 2 attempts and ignores any other attempts to load data into the cache. Why? Imports System.Web.Services 'Imports System.Web.Caching.Cache <System.Web.Services.WebService(Namespace:="http://tempuri.org/wsTranscriptsTest/Service1")> _ Public Class HoldingTank Inherits System.Web.Services.WebService Dim strArray As New ArrayList #Region " Web Services Designer Generated Code " Public Sub New() MyBase.New() 'This call is required by the Web Services Designer. InitializeComponent() 'Add your own initialization code after the InitializeComponent() call End Sub 'Required by the Web Services Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Web Services Designer 'It can be modified using the Web Services Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() components = New System.ComponentModel.Container End Sub Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) 'CODEGEN: This procedure is required by the Web Services Designer 'Do not modify it using the code editor. If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub #End Region [color=green] <WebMethod()> _ Public Function HelloWorld() As ArrayList If Context.Cache("strArray") Is Nothing Then CreateCache() End If Dim arrReturnList As ArrayList = CType(Context.Cache("strArray"), ArrayList) Context.Cache.Remove("strArray") Return arrReturnList End Function <WebMethod()> _ Public Sub FillCache(ByVal strValue As String) If Context.Cache("strArray") Is Nothing Then CreateCache() End If strArray.Add(strValue) Context.Cache.Add("strArray", strArray, Nothing, Now.AddHours(1), Nothing, Caching.CacheItemPriority.High, Nothing) End Sub Private Sub CreateCache() strArray.Add("StarterValue") 'Context.Cache.Insert("strArray", strArray) Context.Cache.Add("strArray", strArray, Nothing, Now.AddHours(1), Nothing, Caching.CacheItemPriority.High, Nothing) End Sub End Class [/color]
  8. ok that is good to know thanks
  9. Why not use the asp.net forums? They are free. http://www.asp.net/Forums/Download/Default.aspx?tabindex=0&tabid=1
  10. yes
  11. I am using a Class file in its own project NOT a web app.
  12. Would you mind explaining how to do this? I am not clear... :confused: Thanks
  13. Maybe I can isolate the call through an Async call on another thread?
  14. What I don't understand is that the code that does this is actually a Class apart from the ASP.NET project.
  15. I have a strange problem. I get an "Access Denied Error" when I try to instantiate a Word.Application in my custom vb.net class from an ASPX page. Dim wrdApp As New Word.Application How can I fix? Here is the error: Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UnauthorizedAccessException: Access is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access. Source Error:
×
×
  • Create New...