
jesus4u
Avatar/Signature-
Posts
47 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by jesus4u
-
Where is the ability to create a Watch condition and break when a value is true? thanks
-
In code how do I retrieve my Exe's name? Thanks
-
I am not explicitly using Option Strict on so is it on by default then? Thanks
-
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
-
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]
-
ok that is good to know thanks
-
Why not use the asp.net forums? They are free. http://www.asp.net/Forums/Download/Default.aspx?tabindex=0&tabid=1
-
I am using a Class file in its own project NOT a web app.
-
Would you mind explaining how to do this? I am not clear... :confused: Thanks
-
Maybe I can isolate the call through an Async call on another thread?
-
What I don't understand is that the code that does this is actually a Class apart from the ASP.NET project.
-
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:
-
Wjy is it that when I use this code in a class being accessed from an aspx page that the values don't get loaded from the config file but when I use it in a windows form it works? 'Config file <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ConnectionString" value="Initial Catalog=Replica;Data Source=localhost;Integrated Security=SSPI;" /> <add key="PathToTranscripts" value="F:\Transcripts Backup\ParsedFiles" /> </appSettings> </configuration> 'Class Code Imports Word Imports System Imports System.IO Imports System.Configuration Imports System.Data.SqlClient Imports Microsoft.ApplicationBlocks.Data Namespace Transcripts Public Class Tools Dim conn As New SqlConnection Dim strPathToTranscripts As String Dim ds As New DataSet Public Sub New() conn.ConnectionString = ConfigurationSettings.AppSettings("ConnectionString") strPathToTranscripts = ConfigurationSettings.AppSettings("PathToTranscripts") End Sub 'etc......
-
I am using the following code in the html to present the user with the ability to select a file to upload to the server. <form id="Form1" encType="multipart/form-data" runat="server"> Select File to Upload: <input id="uploadedFile" type="file" size="20" name="uploadedFile" runat="server"> <p><input id="upload" type="button" value="Upload" name="upload" runat="server" OnServerClick="Upload_Click"> <p><asp:label id="message" runat="server"></asp:label> </form> All is well. I was just wondering if I can programmatically select the location that the user sees when the pop up window appears? I need to show our users on the intranet a specific location on the network versus the default view of their hardrive.
-
Word Application NOT Disposing in VB.NET
jesus4u replied to jesus4u's topic in Interoperation / Office Integration
know what?! You are a genius! That of course works.Thanks:) -
In vb.net I am opening (800+) Word docs. But when I am finished I am setting to nothing the Word Applciation and in the Task Manager it is still there. Why? Dim wrdApp As New Word.Application 'etc....... Dim wrdDoc As New Word.Document wrdDoc = wrdApp.Documents.Open(fiTemp.FullName, , True) 'etc....... wrdDoc.Close(False) wrdDoc = Nothing wrdApp = Nothing
-
Our company here has a Word Macro that parses hundreds of docs and stuffs into a sql db. Is there a way that I can schedule that Macro to run at 12am every day? Thanks
-
thanks I'll take a look
-
yes! I want to use just one DataSet, put it in cache, so that I can just requery that data instead of hitting the database.
-
thanks but I want to remove columns not rows.
-
I am storing a DataSet that contains 1 Table called Table1 that has 10 columns of data with 100 rows. I am wanting to use this cached DataSet to run various DataTable.Select(etc...) against. But what if I want to run a Select that only returns to me 5 columns of 100 rows of data? Can I do this? Thanks
-
ok got it to filter and bind BUT how can I bind where the one record fills the Grid in one row? The way it is now it loads all the data into one column. Dim ds As New DataSet ds = dataAccess.ExecuteDataset(conn.ConnectionString, CommandType.StoredProcedure, "GetAllTranscripts") Cache.Add("AllTranscripts", ds.Tables(0), Nothing, DateTime.Now.AddMinutes(30), TimeSpan.Zero, CacheItemPriority.Low, Nothing) drTranscriptSummary = QueryDataTable("TranscriptsID = 681") DataGrid1.DataSource = drTranscriptSummary(0).ItemArray DataGrid1.DataBind()