Showing posts with label shared. Show all posts
Showing posts with label shared. Show all posts

Saturday, March 31, 2012

The beginning.

Ok,

I have a file 'WeatherPage.aspx' with the following code, basic stuff:

<%@dotnet.itags.org. Page language="VB" %>
<script runat="server"
Shared rand As Random = New Random()
Function GetForecast(zip As String) As String
Dim ret As String = String.Empty
Select rand.Next(5)
Case 0
ret = "Sunny and warm"
Case 1
ret = "Partly cloudy and chilly"
Case 2
ret = "Cold with a chance of snow"
Case 3
ret = "Rain"
Case 4
ret = "Foggy and damp"
End Select
Return ret
End Function

</script>
<html>
<body>
<h1>My weather forecast page</h1>
<p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
<p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
<p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
<p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
<p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
</body>
</html
my operating system is Windows XP profesional. I use Internet Information
Services 5.1 (IIS).

When I run this page in a webbrowser, the function 'GetForecast' doesn't
display anything ( no error's). All I see is the HTML text. What can I be
doing wrong? I got this code from a tutorial.
Is the code incorrect? Can IIS have incorrect settings?

Thanks.The browser does give an error: Line 4, ";" is expected.
Isn't ";" used for "C#".
Page language is set to "VB".

"Qwert" <nosp@dotnet.itags.org.nosp.com> schreef in bericht
news:Cpidncmdb6Qw76TfRVnyvg@dotnet.itags.org.casema.nl...
> Ok,
> I have a file 'WeatherPage.aspx' with the following code, basic stuff:
> <%@dotnet.itags.org. Page language="VB" %>
> <script runat="server">
> Shared rand As Random = New Random()
> Function GetForecast(zip As String) As String
> Dim ret As String = String.Empty
> Select rand.Next(5)
> Case 0
> ret = "Sunny and warm"
> Case 1
> ret = "Partly cloudy and chilly"
> Case 2
> ret = "Cold with a chance of snow"
> Case 3
> ret = "Rain"
> Case 4
> ret = "Foggy and damp"
> End Select
> Return ret
> End Function
> </script>
> <html>
> <body>
> <h1>My weather forecast page</h1>
> <p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
> <p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
> <p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
> <p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
> <p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
> </body>
> </html>
>
> my operating system is Windows XP profesional. I use Internet Information
> Services 5.1 (IIS).
> When I run this page in a webbrowser, the function 'GetForecast' doesn't
> display anything ( no error's). All I see is the HTML text. What can I be
> doing wrong? I got this code from a tutorial.
> Is the code incorrect? Can IIS have incorrect settings?
> Thanks.
You need to enclose your frunctions within

Sub

End Sub

statements.

If you want the code to execut automatically
when the page loads, use Sub Page_Load :

<script runat="server">
Sub Page_Load(Src as Object, e As System.EventArgs)

...rest of your code

End Sub
<//script
best,

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================

"Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
news:Cpidncmdb6Qw76TfRVnyvg@dotnet.itags.org.casema.nl...
> Ok,
> I have a file 'WeatherPage.aspx' with the following code, basic stuff:
> <%@dotnet.itags.org. Page language="VB" %>
> <script runat="server"
> Shared rand As Random = New Random()
> Function GetForecast(zip As String) As String
> Dim ret As String = String.Empty
> Select rand.Next(5)
> Case 0
> ret = "Sunny and warm"
> Case 1
> ret = "Partly cloudy and chilly"
> Case 2
> ret = "Cold with a chance of snow"
> Case 3
> ret = "Rain"
> Case 4
> ret = "Foggy and damp"
> End Select
> Return ret
> End Function
> </script>
> <html>
> <body>
> <h1>My weather forecast page</h1>
> <p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
> <p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
> <p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
> <p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
> <p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
> </body>
> </html>
>
> my operating system is Windows XP profesional. I use Internet Information
> Services 5.1 (IIS).
> When I run this page in a webbrowser, the function 'GetForecast' doesn't
> display anything ( no error's). All I see is the HTML text. What can I be
> doing wrong? I got this code from a tutorial.
> Is the code incorrect? Can IIS have incorrect settings?
> Thanks.
You mean something like this, it does not work either:

<html
<script language="VB" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Message.Text = "You last accessed this page at: " & DateTime.Now
End Sub
</script
<body>
<h3><font face="Verdana">Manipulating Server Controls</font></h3>
This sample demonstrates how to manipulate the <asp:label>
server control within
the Page_Load event to output the current time.
<p>
<hr>
<asp:label id="Message" font-size="24" font-bold="true"
runat=server/>
</body>
</html
I see the HTML in the browser, but not the Message.Text in the label
control.

"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> schreef in bericht
news:ew9vH$uKFHA.1948@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> You need to enclose your frunctions within
> Sub
> End Sub
> statements.
> If you want the code to execut automatically
> when the page loads, use Sub Page_Load :
> <script runat="server">
> Sub Page_Load(Src as Object, e As System.EventArgs)
> ...rest of your code
> End Sub
> <//script>
> best,
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaol
> Ven, y hablemos de ASP.NET...
> ======================
> "Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
> news:Cpidncmdb6Qw76TfRVnyvg@dotnet.itags.org.casema.nl...
>> Ok,
>>
>> I have a file 'WeatherPage.aspx' with the following code, basic stuff:
>>
>> <%@dotnet.itags.org. Page language="VB" %>
>> <script runat="server">
>> Shared rand As Random = New Random()
>> Function GetForecast(zip As String) As String
>> Dim ret As String = String.Empty
>> Select rand.Next(5)
>> Case 0
>> ret = "Sunny and warm"
>> Case 1
>> ret = "Partly cloudy and chilly"
>> Case 2
>> ret = "Cold with a chance of snow"
>> Case 3
>> ret = "Rain"
>> Case 4
>> ret = "Foggy and damp"
>> End Select
>> Return ret
>> End Function
>>
>> </script>
>> <html>
>> <body>
>> <h1>My weather forecast page</h1>
>> <p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
>> <p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
>> <p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
>> <p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
>> <p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
>> </body>
>> </html>
>>
>>
>> my operating system is Windows XP profesional. I use Internet Information
>> Services 5.1 (IIS).
>>
>> When I run this page in a webbrowser, the function 'GetForecast' doesn't
>> display anything ( no error's). All I see is the HTML text. What can I be
>> doing wrong? I got this code from a tutorial.
>> Is the code incorrect? Can IIS have incorrect settings?
>>
>> Thanks.
I just pasted your code into
http://asp.net.do/test/vbtest2.aspx

It works fine.

Are you using http://localhost/virtualdirectory/yourfile.aspx ?
Or http://localhost/yourfile.aspx ?
Or http://YourComputerName/virtualdirectory/yourfile.aspx ?
Or http://yourserver.com/directory/yourfile.aspx ?

If you are, and it still doesn't work, try re-registering ASP.NET
from the .NET framework's main directory :

aspnet_regiis -i

( You did install the .NET Framework, right ? )

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================

"Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
news:CpOdnY2NHqHpHKTfRVnyiw@dotnet.itags.org.casema.nl...
> You mean something like this, it does not work either:
> <html>
> <script language="VB" runat="server">
> Sub Page_Load(Sender As Object, E As EventArgs)
> Message.Text = "You last accessed this page at: " &
> DateTime.Now
> End Sub
> </script>
> <body>
> <h3><font face="Verdana">Manipulating Server Controls</font></h3>
> This sample demonstrates how to manipulate the <asp:label>
> server control within
> the Page_Load event to output the current time.
> <p>
> <hr>
> <asp:label id="Message" font-size="24" font-bold="true"
> runat=server/>
> </body>
> </html>
>
> I see the HTML in the browser, but not the Message.Text in the label
> control.
>
> "Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> schreef in bericht
> news:ew9vH$uKFHA.1948@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>> You need to enclose your frunctions within
>>
>> Sub
>>
>> End Sub
>>
>> statements.
>>
>> If you want the code to execut automatically
>> when the page loads, use Sub Page_Load :
>>
>> <script runat="server">
>> Sub Page_Load(Src as Object, e As System.EventArgs)
>>
>> ...rest of your code
>>
>> End Sub
>> <//script>
>>
>> best,
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espaol
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
>> news:Cpidncmdb6Qw76TfRVnyvg@dotnet.itags.org.casema.nl...
>>> Ok,
>>>
>>> I have a file 'WeatherPage.aspx' with the following code, basic stuff:
>>>
>>> <%@dotnet.itags.org. Page language="VB" %>
>>> <script runat="server">
>>
>>> Shared rand As Random = New Random()
>>> Function GetForecast(zip As String) As String
>>> Dim ret As String = String.Empty
>>> Select rand.Next(5)
>>> Case 0
>>> ret = "Sunny and warm"
>>> Case 1
>>> ret = "Partly cloudy and chilly"
>>> Case 2
>>> ret = "Cold with a chance of snow"
>>> Case 3
>>> ret = "Rain"
>>> Case 4
>>> ret = "Foggy and damp"
>>> End Select
>>> Return ret
>>> End Function
>>>
>>> </script>
>>> <html>
>>> <body>
>>> <h1>My weather forecast page</h1>
>>> <p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
>>> <p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
>>> <p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
>>> <p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
>>> <p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
>>> </body>
>>> </html>
>>>
>>>
>>> my operating system is Windows XP profesional. I use Internet
>>> Information Services 5.1 (IIS).
>>>
>>> When I run this page in a webbrowser, the function 'GetForecast' doesn't
>>> display anything ( no error's). All I see is the HTML text. What can I
>>> be doing wrong? I got this code from a tutorial.
>>> Is the code incorrect? Can IIS have incorrect settings?
>>>
>>> Thanks.
>>
>>
> If you are, and it still doesn't work, try re-registering ASP.NET
> from the .NET framework's main directory :
> aspnet_regiis -i

It worked....but weird. Someone already installed .NET Framework. Doesn't
make sense ASP.NET needs a seperate installement...I wasn't there when it
was installed on my comp, maybe you can select an option during installation
that you don't want to install ASP.NET.

3 cheers for spain!

Thanks.

> ( You did install the .NET Framework, right ? )
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaol
> Ven, y hablemos de ASP.NET...
> ======================
> "Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
> news:CpOdnY2NHqHpHKTfRVnyiw@dotnet.itags.org.casema.nl...
>> You mean something like this, it does not work either:
>>
>> <html>
>>
>> <script language="VB" runat="server">
>> Sub Page_Load(Sender As Object, E As EventArgs)
>> Message.Text = "You last accessed this page at: " &
>> DateTime.Now
>> End Sub
>> </script>
>>
>> <body>
>> <h3><font face="Verdana">Manipulating Server Controls</font></h3>
>> This sample demonstrates how to manipulate the <asp:label>
>> server control within
>> the Page_Load event to output the current time.
>> <p>
>> <hr>
>> <asp:label id="Message" font-size="24" font-bold="true"
>> runat=server/>
>> </body>
>> </html>
>>
>>
>> I see the HTML in the browser, but not the Message.Text in the label
>> control.
>>
>>
>> "Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> schreef in bericht
>> news:ew9vH$uKFHA.1948@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>>> You need to enclose your frunctions within
>>>
>>> Sub
>>>
>>> End Sub
>>>
>>> statements.
>>>
>>> If you want the code to execut automatically
>>> when the page loads, use Sub Page_Load :
>>>
>>> <script runat="server">
>>> Sub Page_Load(Src as Object, e As System.EventArgs)
>>>
>>> ...rest of your code
>>>
>>> End Sub
>>> <//script>
>>>
>>> best,
>>>
>>>
>>> Juan T. Llibre
>>> ASP.NET MVP
>>> http://asp.net.do/foros/
>>> Foros de ASP.NET en Espaol
>>> Ven, y hablemos de ASP.NET...
>>> ======================
>>>
>>> "Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
>>> news:Cpidncmdb6Qw76TfRVnyvg@dotnet.itags.org.casema.nl...
>>>> Ok,
>>>>
>>>> I have a file 'WeatherPage.aspx' with the following code, basic stuff:
>>>>
>>>> <%@dotnet.itags.org. Page language="VB" %>
>>>> <script runat="server">
>>>
>>>> Shared rand As Random = New Random()
>>>> Function GetForecast(zip As String) As String
>>>> Dim ret As String = String.Empty
>>>> Select rand.Next(5)
>>>> Case 0
>>>> ret = "Sunny and warm"
>>>> Case 1
>>>> ret = "Partly cloudy and chilly"
>>>> Case 2
>>>> ret = "Cold with a chance of snow"
>>>> Case 3
>>>> ret = "Rain"
>>>> Case 4
>>>> ret = "Foggy and damp"
>>>> End Select
>>>> Return ret
>>>> End Function
>>>>
>>>> </script>
>>>> <html>
>>>> <body>
>>>> <h1>My weather forecast page</h1>
>>>> <p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
>>>> <p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
>>>> <p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
>>>> <p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
>>>> <p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
>>>> </body>
>>>> </html>
>>>>
>>>>
>>>> my operating system is Windows XP profesional. I use Internet
>>>> Information Services 5.1 (IIS).
>>>>
>>>> When I run this page in a webbrowser, the function 'GetForecast'
>>>> doesn't display anything ( no error's). All I see is the HTML text.
>>>> What can I be doing wrong? I got this code from a tutorial.
>>>> Is the code incorrect? Can IIS have incorrect settings?
>>>>
>>>> Thanks.
>>>
>>>
>>
>>
re:
> Thanks.

You're very much welcome!
Glad it worked!

re:
> Someone already installed .NET Framework. Doesn't make sense ASP.NET needs
> a seperate installement.

Maybe someone uninstalled/reinstalled IIS ?
That would require re-registering ASP.NET with the new IIS.

re:
> 3 cheers for spain!

Make that the Dominican Republic... ;-)

Happy coding!
Don't let the bug(ger)s get you!

:-)

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================

"Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
news:-b6dnYlGzYMPDaTfRVnyiw@dotnet.itags.org.casema.nl...
>> If you are, and it still doesn't work, try re-registering ASP.NET
>> from the .NET framework's main directory :
>>
>> aspnet_regiis -i
> It worked....but weird. Someone already installed .NET Framework. Doesn't
> make sense ASP.NET needs a seperate installement...I wasn't there when it
> was installed on my comp, maybe you can select an option during
> installation that you don't want to install ASP.NET.
> 3 cheers for spain!
> Thanks.

>> ( You did install the .NET Framework, right ? )
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espaol
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
>> news:CpOdnY2NHqHpHKTfRVnyiw@dotnet.itags.org.casema.nl...
>>> You mean something like this, it does not work either:
>>>
>>> <html>
>>>
>>> <script language="VB" runat="server">
>>> Sub Page_Load(Sender As Object, E As EventArgs)
>>> Message.Text = "You last accessed this page at: " &
>>> DateTime.Now
>>> End Sub
>>> </script>
>>>
>>> <body>
>>> <h3><font face="Verdana">Manipulating Server Controls</font></h3>
>>> This sample demonstrates how to manipulate the <asp:label>
>>> server control within
>>> the Page_Load event to output the current time.
>>> <p>
>>> <hr>
>>> <asp:label id="Message" font-size="24" font-bold="true"
>>> runat=server/>
>>> </body>
>>> </html>
>>>
>>>
>>> I see the HTML in the browser, but not the Message.Text in the label
>>> control.
>>>
>>>
>>> "Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> schreef in bericht
>>> news:ew9vH$uKFHA.1948@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>>>> You need to enclose your frunctions within
>>>>
>>>> Sub
>>>>
>>>> End Sub
>>>>
>>>> statements.
>>>>
>>>> If you want the code to execut automatically
>>>> when the page loads, use Sub Page_Load :
>>>>
>>>> <script runat="server">
>>>> Sub Page_Load(Src as Object, e As System.EventArgs)
>>>>
>>>> ...rest of your code
>>>>
>>>> End Sub
>>>> <//script>
>>>>
>>>> best,
>>>>
>>>>
>>>> Juan T. Llibre
>>>> ASP.NET MVP
>>>> http://asp.net.do/foros/
>>>> Foros de ASP.NET en Espaol
>>>> Ven, y hablemos de ASP.NET...
>>>> ======================
>>>>
>>>> "Qwert" <nosp@dotnet.itags.org.nosp.com> wrote in message
>>>> news:Cpidncmdb6Qw76TfRVnyvg@dotnet.itags.org.casema.nl...
>>>>> Ok,
>>>>>
>>>>> I have a file 'WeatherPage.aspx' with the following code, basic stuff:
>>>>>
>>>>> <%@dotnet.itags.org. Page language="VB" %>
>>>>> <script runat="server">
>>>>
>>>>> Shared rand As Random = New Random()
>>>>> Function GetForecast(zip As String) As String
>>>>> Dim ret As String = String.Empty
>>>>> Select rand.Next(5)
>>>>> Case 0
>>>>> ret = "Sunny and warm"
>>>>> Case 1
>>>>> ret = "Partly cloudy and chilly"
>>>>> Case 2
>>>>> ret = "Cold with a chance of snow"
>>>>> Case 3
>>>>> ret = "Rain"
>>>>> Case 4
>>>>> ret = "Foggy and damp"
>>>>> End Select
>>>>> Return ret
>>>>> End Function
>>>>>
>>>>> </script>
>>>>> <html>
>>>>> <body>
>>>>> <h1>My weather forecast page</h1>
>>>>> <p>The weather for zipcode 04090 is: <%= GetForecast("04090") %> </p>
>>>>> <p>The weather for zipcode 90210 is: <%= GetForecast("90210") %> </p>
>>>>> <p>The weather for zipcode 84101 is: <%= GetForecast("84101") %> </p>
>>>>> <p>The weather for zipcode 80014 is: <%= GetForecast("80014") %> </p>
>>>>> <p>The weather for zipcode 02101 is: <%= GetForecast("02101") %> </p>
>>>>> </body>
>>>>> </html>
>>>>>
>>>>>
>>>>> my operating system is Windows XP profesional. I use Internet
>>>>> Information Services 5.1 (IIS).
>>>>>
>>>>> When I run this page in a webbrowser, the function 'GetForecast'
>>>>> doesn't display anything ( no error's). All I see is the HTML text.
>>>>> What can I be doing wrong? I got this code from a tutorial.
>>>>> Is the code incorrect? Can IIS have incorrect settings?
>>>>>
>>>>> Thanks.
>>>>
>>>>
>>>
>>>
>>
>>

Wednesday, March 28, 2012

The best way to archieve this? Help please

I have an ASP.NET application running on one win2k server and it needs to
access a shared folder in other server. To access this shared folder, I have
to login with user name and password.

I used IWshRuntimeLibrary.WshNetwork() and mapped the folder to a network
drive (Y:\) in the page_load. Then I disconnected this drive in the
page_unload. I got it works but not stable. Sometimes it fails to disconnect
and to map.

thanks"dbui" <nnngoan@dotnet.itags.org.hotmail.com> wrote in
news:u6zLB9pbEHA.1408@dotnet.itags.org.TK2MSFTNGP12.phx.gbl:

> I used IWshRuntimeLibrary.WshNetwork() and mapped the folder to a
> network drive (Y:\) in the page_load. Then I disconnected this drive
> in the page_unload. I got it works but not stable. Sometimes it fails
> to disconnect and to map.

How about impersonating a user with access to that drive?

http://support.microsoft.com/defaul...b;EN-US;Q306158

--
Lucas Tam (REMOVEnntp@dotnet.itags.org.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
thanks for the link.

"Lucas Tam" <REMOVEnntp@dotnet.itags.org.rogers.com> wrote in message
news:Xns952CB1601E166nntprogerscom@dotnet.itags.org.140.99.99.130.. .
> "dbui" <nnngoan@dotnet.itags.org.hotmail.com> wrote in
> news:u6zLB9pbEHA.1408@dotnet.itags.org.TK2MSFTNGP12.phx.gbl:
> > I used IWshRuntimeLibrary.WshNetwork() and mapped the folder to a
> > network drive (Y:\) in the page_load. Then I disconnected this drive
> > in the page_unload. I got it works but not stable. Sometimes it fails
> > to disconnect and to map.
> How about impersonating a user with access to that drive?
> http://support.microsoft.com/defaul...b;EN-US;Q306158
> --
> Lucas Tam (REMOVEnntp@dotnet.itags.org.rogers.com)
> Please delete "REMOVE" from the e-mail address when replying.
> http://members.ebay.com/aboutme/coolspot18/

The best way to archieve this? Help please

I have an ASP.NET application running on one win2k server and it needs to
access a shared folder in other server. To access this shared folder, I have
to login with user name and password.
I used IWshRuntimeLibrary.WshNetwork() and mapped the folder to a network
drive (Y:\) in the page_load. Then I disconnected this drive in the
page_unload. I got it works but not stable. Sometimes it fails to disconnect
and to map.
thanks"dbui" <nnngoan@dotnet.itags.org.hotmail.com> wrote in
news:u6zLB9pbEHA.1408@dotnet.itags.org.TK2MSFTNGP12.phx.gbl:

> I used IWshRuntimeLibrary.WshNetwork() and mapped the folder to a
> network drive (Y:\) in the page_load. Then I disconnected this drive
> in the page_unload. I got it works but not stable. Sometimes it fails
> to disconnect and to map.
>
How about impersonating a user with access to that drive?
http://support.microsoft.com/defaul...b;EN-US;Q306158
Lucas Tam (REMOVEnntp@dotnet.itags.org.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
thanks for the link.
"Lucas Tam" <REMOVEnntp@dotnet.itags.org.rogers.com> wrote in message
news:Xns952CB1601E166nntprogerscom@dotnet.itags.org.140.99.99.130...
> "dbui" <nnngoan@dotnet.itags.org.hotmail.com> wrote in
> news:u6zLB9pbEHA.1408@dotnet.itags.org.TK2MSFTNGP12.phx.gbl:
>
> How about impersonating a user with access to that drive?
> http://support.microsoft.com/defaul...b;EN-US;Q306158
> --
> Lucas Tam (REMOVEnntp@dotnet.itags.org.rogers.com)
> Please delete "REMOVE" from the e-mail address when replying.
> [url]http://members.ebay.com/aboutme/spot18/[/url]

Monday, March 26, 2012

the connection string property has not been initialized

in one of my classes i have a private function, which sets connection
other public shared functions call this connection
when i try to call the public shared functions say to my form code i get that error
any one ever had that beforemake sure that the SQLCommand object's connection property is set to the SQLConnection object:

string connString = "blah"; //insert REAL conn string here
SQLConnection theConnection = new SQLConnection(connString);
SQLCommand theSQLCommand = new SQLCommand();
theSQLCommand.Connection = theConnection; //This line
..
..

Tuesday, March 13, 2012

The issue of Spam and Mail Servers and legitimate use

Hello,
I am currently hosting an asp.net site on a shared crystaltech server,
which involves sending email via their mail servers. The problem is
that most of crystal tech's mail servers have been marked as 'spam
servers', and therefore email sent to aol or yahoo accounts are
rejected. This is of course not acceptable for a commercial online app
that depends on email messages getting received by its users.
Is this the case with most mail servers online? Is there a way around
this? What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?
Thank you for your time and help.
Regards,
Jimre:
> What is a web app developer to do, whose intentions is not to
> spam, but whose app requires the legitimate use of mail servers?
Either use your own smtp server or host at an ISP which is not blacklisted.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.com> wrote in message news:1172951742.456367.83070@.j27g2000cwj.googlegroup
s.com...
> Hello,
> I am currently hosting an asp.net site on a shared crystaltech server,
> which involves sending email via their mail servers. The problem is
> that most of crystal tech's mail servers have been marked as 'spam
> servers', and therefore email sent to aol or yahoo accounts are
> rejected. This is of course not acceptable for a commercial online app
> that depends on email messages getting received by its users.
> Is this the case with most mail servers online? Is there a way around
> this? What is a web app developer to do, whose intentions is not to
> spam, but whose app requires the legitimate use of mail servers?
> Thank you for your time and help.
> Regards,
> Jim
>
On Mar 3, 3:08 pm, "Juan T. Llibre" <nomailrepl...@.nowhere.com> wrote:
> re:
>
> Either use your own smtp server or host at an ISP which is not blackliste=
d=2E
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en espa=F1ol :http://asp.net.do/foros/
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Ddarkred">
>
> <dejavu...@.yahoo.com> wrote in messagenews:1172951742.456367.83070@.j27g20=
00cwj.googlegroups.com...
>
>
>
>
>
> - Show quoted text -
Hi Juan,
How does one go about finding this out about a given ISP? Is there a
list?
Thanks.
re:
!>How does one go about finding this out about a given ISP? Is there a list?
You can query any of several public services.
http://spamcop.net/bl.shtml
http://www.spamhaus.org/sbl/
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.com> wrote in message news:1172957501.514770.313190@.64g2000
cwx.googlegroups.com...
On Mar 3, 3:08 pm, "Juan T. Llibre" <nomailrepl...@.nowhere.com> wrote:
> re:
>
> Either use your own smtp server or host at an ISP which is not blacklisted
.
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en espaol :http://asp.net.do/foros/
> ===================================
>
> <dejavu...@.yahoo.com> wrote in messagenews:1172951742.456367.83070@.j27g200
0cwj.googlegroups.com...
>
>
>
>
>
> - Show quoted text -
Hi Juan,
How does one go about finding this out about a given ISP? Is there a
list?
Thanks.
If your hosting company is on a blacklist for mail spamming then you should
"only" think about finding a reputable hosting company and dumping them
ASAP. You get blacklisted for allowing hosters to send out spam and doing
nothing about it - this type of company are usually very unreliable and you
should expect problems with support down the line as they are usually only
interested in getting money in and dont normally give two hoots when
problems arise.
Regards
John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:ODFrs7dXHHA.4232@.TK2MSFTNGP05.phx.gbl...
> re:
> !>How does one go about finding this out about a given ISP? Is there a
> list?
> You can query any of several public services.
> http://spamcop.net/bl.shtml
> http://www.spamhaus.org/sbl/
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaol : http://asp.net.do/foros/
> ===================================
> <dejavue82@.yahoo.com> wrote in message
> news:1172957501.514770.313190@.64g2000cwx.googlegroups.com...
> On Mar 3, 3:08 pm, "Juan T. Llibre" <nomailrepl...@.nowhere.com> wrote:
>
> Hi Juan,
> How does one go about finding this out about a given ISP? Is there a
> list?
> Thanks.
>
>
Hi John,
That makes sense, however, except for this spamming issue,
CrystalTech has been a pretty good host and answers questions very
promptly. That's why I was a bit surprised when this problem came up.
btw, the address of my current mail server is
maila62.webcontrolcenter.com
On the other hand, I'm not sure how an ISP could prevent a user from
using their mail servers to spam. And when a company like yahoo or aol
blacklists them, it's already too late.
Maybe you should look for another reason why your mails are bouncing as spam
.
That mail server has the IP 216.119.106.40
and neither Spamhaus nor Spamcop list it..
http://www.spamhaus.org/query/bl?ip=216.119.106.40
http://spamcop.net/sc?track=216.119.106.40
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.com> wrote in message news:1172964192.977930.117000@.s48g2000cws.googlegrou
ps.com...
> btw, the address of my current mail server is

> maila62.webcontrolcenter.com
well even the ISP I use has been blacklisted before, but credible companies
manage to get themselves removed within a couple of hours and respond to the
issue that caused them to be blacklisted. Spamhause etc. have procedures in
place to get your company removed. If your ISP are good (and I personally
cant comment on them) then you should ask them what the problem is and how
they intend to deal with it.
It may be as Juan suggested that there is a different reason why your mails
are being rejected.
--
Regards
John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
<dejavue82@.yahoo.com> wrote in message
news:1172964908.346649.249780@.j27g2000cwj.googlegroups.com...
> On the other hand, I'm not sure how an ISP could prevent a user from
> using their mail servers to spam. And when a company like yahoo or aol
> blacklists them, it's already too late.
>

The issue of Spam and Mail Servers and legitimate use

Hello,

I am currently hosting an asp.net site on a shared crystaltech server,
which involves sending email via their mail servers. The problem is
that most of crystal tech's mail servers have been marked as 'spam
servers', and therefore email sent to aol or yahoo accounts are
rejected. This is of course not acceptable for a commercial online app
that depends on email messages getting received by its users.

Is this the case with most mail servers online? Is there a way around
this? What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?

Thank you for your time and help.

Regards,

Jimre:

Quote:

Originally Posted by

What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


Either use your own smtp server or host at an ISP which is not blacklisted.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.comwrote in message news:1172951742.456367.83070@.j27g2000cwj.googlegro ups.com...

Quote:

Originally Posted by

Hello,
>
I am currently hosting an asp.net site on a shared crystaltech server,
which involves sending email via their mail servers. The problem is
that most of crystal tech's mail servers have been marked as 'spam
servers', and therefore email sent to aol or yahoo accounts are
rejected. This is of course not acceptable for a commercial online app
that depends on email messages getting received by its users.
>
Is this the case with most mail servers online? Is there a way around
this? What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?
>
Thank you for your time and help.
>
Regards,
>
Jim
>


On Mar 3, 3:08 pm, "Juan T. Llibre" <nomailrepl...@.nowhere.comwrote:

Quote:

Originally Posted by

re:
>

Quote:

Originally Posted by

What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


>
Either use your own smtp server or host at an ISP which is not blacklisted.
>
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espaol :http://asp.net.do/foros/
===================================
>
>
>
<dejavu...@.yahoo.comwrote in messagenews:1172951742.456367.83070@.j27g2000cwj.go oglegroups.com...

Quote:

Originally Posted by

Hello,


>

Quote:

Originally Posted by

I am currently hosting an asp.net site on a shared crystaltech server,
which involves sending email via their mail servers. The problem is
that most of crystal tech's mail servers have been marked as 'spam
servers', and therefore email sent to aol or yahoo accounts are
rejected. This is of course not acceptable for a commercial online app
that depends on email messages getting received by its users.


>

Quote:

Originally Posted by

Is this the case with most mail servers online? Is there a way around
this? What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


>

Quote:

Originally Posted by

Thank you for your time and help.


>

Quote:

Originally Posted by

Regards,


>

Quote:

Originally Posted by

Jim- Hide quoted text -


>
- Show quoted text -


Hi Juan,

How does one go about finding this out about a given ISP? Is there a
list?

Thanks.
re:
!>How does one go about finding this out about a given ISP? Is there a list?

You can query any of several public services.

http://spamcop.net/bl.shtml
http://www.spamhaus.org/sbl/
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.comwrote in message news:1172957501.514770.313190@.64g2000cwx.googlegro ups.com...
On Mar 3, 3:08 pm, "Juan T. Llibre" <nomailrepl...@.nowhere.comwrote:

Quote:

Originally Posted by

re:
>

Quote:

Originally Posted by

What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


>
Either use your own smtp server or host at an ISP which is not blacklisted.
>
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en espaol :http://asp.net.do/foros/
===================================
>
>
>
<dejavu...@.yahoo.comwrote in messagenews:1172951742.456367.83070@.j27g2000cwj.go oglegroups.com...

Quote:

Originally Posted by

Hello,


>

Quote:

Originally Posted by

I am currently hosting an asp.net site on a shared crystaltech server,
which involves sending email via their mail servers. The problem is
that most of crystal tech's mail servers have been marked as 'spam
servers', and therefore email sent to aol or yahoo accounts are
rejected. This is of course not acceptable for a commercial online app
that depends on email messages getting received by its users.


>

Quote:

Originally Posted by

Is this the case with most mail servers online? Is there a way around
this? What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


>

Quote:

Originally Posted by

Thank you for your time and help.


>

Quote:

Originally Posted by

Regards,


>

Quote:

Originally Posted by

Jim- Hide quoted text -


>
- Show quoted text -


Hi Juan,

How does one go about finding this out about a given ISP? Is there a
list?

Thanks.
If your hosting company is on a blacklist for mail spamming then you should
"only" think about finding a reputable hosting company and dumping them
ASAP. You get blacklisted for allowing hosters to send out spam and doing
nothing about it - this type of company are usually very unreliable and you
should expect problems with support down the line as they are usually only
interested in getting money in and dont normally give two hoots when
problems arise.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Juan T. Llibre" <nomailreplies@.nowhere.comwrote in message
news:ODFrs7dXHHA.4232@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

re:
!>How does one go about finding this out about a given ISP? Is there a
list?
>
You can query any of several public services.
>
http://spamcop.net/bl.shtml
>
http://www.spamhaus.org/sbl/
>
>
>
>
>
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.comwrote in message
news:1172957501.514770.313190@.64g2000cwx.googlegro ups.com...
On Mar 3, 3:08 pm, "Juan T. Llibre" <nomailrepl...@.nowhere.comwrote:

Quote:

Originally Posted by

>re:
>>

Quote:

Originally Posted by

What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


>>
>Either use your own smtp server or host at an ISP which is not
>blacklisted.
>>
>Juan T. Llibre, asp.net MVP
>asp.net faq :http://asp.net.do/faq/
>foros de asp.net, en espaol :http://asp.net.do/foros/
>===================================
>>
>>
>>
><dejavu...@.yahoo.comwrote in
>messagenews:1172951742.456367.83070@.j27g2000cwj.go oglegroups.com...

Quote:

Originally Posted by

Hello,


>>

Quote:

Originally Posted by

I am currently hosting an asp.net site on a shared crystaltech server,
which involves sending email via their mail servers. The problem is
that most of crystal tech's mail servers have been marked as 'spam
servers', and therefore email sent to aol or yahoo accounts are
rejected. This is of course not acceptable for a commercial online app
that depends on email messages getting received by its users.


>>

Quote:

Originally Posted by

Is this the case with most mail servers online? Is there a way around
this? What is a web app developer to do, whose intentions is not to
spam, but whose app requires the legitimate use of mail servers?


>>

Quote:

Originally Posted by

Thank you for your time and help.


>>

Quote:

Originally Posted by

Regards,


>>

Quote:

Originally Posted by

Jim- Hide quoted text -


>>
>- Show quoted text -


>
>
>
Hi Juan,
>
How does one go about finding this out about a given ISP? Is there a
list?
>
Thanks.
>
>
>


Hi John,

That makes sense, however, except for this spamming issue,
CrystalTech has been a pretty good host and answers questions very
promptly. That's why I was a bit surprised when this problem came up.
btw, the address of my current mail server is

maila62.webcontrolcenter.com
On the other hand, I'm not sure how an ISP could prevent a user from
using their mail servers to spam. And when a company like yahoo or aol
blacklists them, it's already too late.
Maybe you should look for another reason why your mails are bouncing as spam.

That mail server has the IP 216.119.106.40
and neither Spamhaus nor Spamcop list it..

http://www.spamhaus.org/query/bl?ip=216.119.106.40
http://spamcop.net/sc?track=216.119.106.40
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
<dejavue82@.yahoo.comwrote in message news:1172964192.977930.117000@.s48g2000cws.googlegr oups.com...

Quote:

Originally Posted by

btw, the address of my current mail server is


Quote:

Originally Posted by

maila62.webcontrolcenter.com


well even the ISP I use has been blacklisted before, but credible companies
manage to get themselves removed within a couple of hours and respond to the
issue that caused them to be blacklisted. Spamhause etc. have procedures in
place to get your company removed. If your ISP are good (and I personally
cant comment on them) then you should ask them what the problem is and how
they intend to deal with it.

It may be as Juan suggested that there is a different reason why your mails
are being rejected.

--
--
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
<dejavue82@.yahoo.comwrote in message
news:1172964908.346649.249780@.j27g2000cwj.googlegr oups.com...

Quote:

Originally Posted by

On the other hand, I'm not sure how an ISP could prevent a user from
using their mail servers to spam. And when a company like yahoo or aol
blacklists them, it's already too late.
>