TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kaushal 0
NA
1
0
Unauthorised access exception(multi threading issue)
Nov 9 2004 1:39 AM
if someone can help me with this, want to know why the below code gives Access is Denide error, Unauthorised acess exception while client creates object dim objTest as new clsDemo Option Explicit On Option Strict On Imports System.EnterpriseServices Imports System.Reflection Imports System.Threading Imports System.IO
Public Class clsDemo Inherits ServicedComponent Dim threadTest As Thread Dim sw As StreamWriter Dim fs As FileStream Dim i As Integer
_ Public Function helloString() As String helloString = "Hello World" End Function
_ Private Sub MultiThread() Dim strfilename As String strfilename = Thread.CurrentThread.Name fs = New FileStream("C:\complus\" & strfilename & ".txt", FileMode.Create, FileAccess.Write) sw = New StreamWriter(fs) For i = 0 To 5 sw.Write(i) Next End Sub Public Sub New() threadTest = New Thread(AddressOf MultiThread) threadTest.Start() End Sub End Class
Reply
Answers (
0
)
Referenced assembly does not have a strong name
Problem with calling managed code dll from Excel