Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Saturday, March 31, 2012

Submitting a web form to a web server from a running windows servive.

hi and help. i have a windows service, in wich i want to submite a web from to a web server with some hidden fiels. how do i do this. and afterwords how can i get response from web server in windows service.
----------
From: Muhammad Saifullah

--------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>i6K//UAKUk2P/CaV2/rNFA==</Id>look up HttpWebRequest

Submitting a web form to a web server from a running windows servive.

hi and help. i have a windows service, in wich i want to submite a web from
to a web server with some hidden fiels. how do i do this. and afterwords how
can i get response from web server in windows service.
--
From: Muhammad Saifullah
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>i6K//UAKUk2P/CaV2/rNFA==</Id>look up HttpWebRequest

Wednesday, March 28, 2012

Suddenly can't load assembly

I am using VS2005, and yesterday I copied a web site from my
development machine to
a Windows 2003 server, and the web site worked fine.
Today I made a few changes on my machine, and tried to repeat the
process,
but I get an error message:
Could not load file or assembly 'BaseRS' or one of its dependencies.
Access is denied
BaseRS.dll is in the bin folder, as it was previously.
Any ideas about what causes this message?What were the "few changes" you made ?
Anything to do with file permissions or the ASP.NET account ?
Did you enable impersonation and now a different account needs permissions ?
Juan T. Llibre
ASP.NET.FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
<jhcorey@.yahoo.com> wrote in message news:1133453674.384226.289410@.z14g2000cwz.googlegroups
.com...
>I am using VS2005, and yesterday I copied a web site from my
> development machine to
> a Windows 2003 server, and the web site worked fine.
> Today I made a few changes on my machine, and tried to repeat the
> process,
> but I get an error message:
> Could not load file or assembly 'BaseRS' or one of its dependencies.
> Access is denied
> BaseRS.dll is in the bin folder, as it was previously.
> Any ideas about what causes this message?
>
Did you try IISReset before doing the deployment.
If not, you may like to do that. Also, clear all your Temporary Asp.net
files from the folder C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files
before you deploy the application.
If that doesn't help you can try Filemon utility from www.sysinternals.com
and serch for access denied after you reproduce the error and save the log
file from the Filemon utility.
HTH
--
Cheers,
Rahul Soni
-->The secret to creativity is knowing how to hide your sources<--
"jhcorey@.yahoo.com" wrote:

> I am using VS2005, and yesterday I copied a web site from my
> development machine to
> a Windows 2003 server, and the web site worked fine.
> Today I made a few changes on my machine, and tried to repeat the
> process,
> but I get an error message:
> Could not load file or assembly 'BaseRS' or one of its dependencies.
> Access is denied
> BaseRS.dll is in the bin folder, as it was previously.
> Any ideas about what causes this message?
>
The app does use impersonation, and that may have been a change in the
web.config.
(Although it uses anonymous access, and yes there was a reason for this
that made sense at one point).
I can experiment without impersonation and see if that makes a
difference. What would I do if it does?
I'm not familiar with any new deployment procedures, so I figure I
better take a look in help.
But I assumed that copying the folders would work for deployment, as it
did in ASP.NET 1.
Anyway, I'll try Rahul's suggestions as well, thanks.
re:
> I can experiment without impersonation and see if that
> makes a difference. What would I do if it does?
Run this aspx page :
identity.aspx :
--
<%@. Page Language="VB" %>
<script runat="server">
Sub Page_Load(obj as object, e as eventargs)
Dim user as string = Environment.Username
lblUser.Text = user
End Sub
</script>
<html>
<body>
<asp:Label id="lblUser" runat="server"/></asp:Label>
</body>
</html>
--
That will tell you which account needs permission to the directory
where the BaseRS assembly is located ( the /bin dir, right ? ).
Juan T. Llibre
ASP.NET.FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
<jhcorey@.yahoo.com> wrote in message news:1133455339.559879.253270@.g44g2000cwa.googlegroups
.com...
> The app does use impersonation, and that may have been a change in the
> web.config.
> (Although it uses anonymous access, and yes there was a reason for this
> that made sense at one point).
> I can experiment without impersonation and see if that makes a
> difference. What would I do if it does?
> I'm not familiar with any new deployment procedures, so I figure I
> better take a look in help.
> But I assumed that copying the folders would work for deployment, as it
> did in ASP.NET 1.
> Anyway, I'll try Rahul's suggestions as well, thanks.
>
Juan,
Impersonation was indeed the issue. The impersonation user id is from
a different domain.
For some reason this did not cause a problem on my development machine.
I'm not sure if I should address this within the folder system or
within IIS6.
I tried changing the security on the folder (it already had 'Everyone'
with full control)
to give explicit access to this userid, but it didn't help.
Thanks,
Jim
Finally got this working (I think)
After quite a bit more playing around with security for impersonated
user,
I googled some more and saw that I had to grant permissions (full
control) on
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
and so I'm running...
Jim

Tuesday, March 13, 2012

Survey Sample (hopefully this copy of my previous post will allow replies!)

Hi

I downloaded the Survey Sample and Survey Admin Sample from MSDN's Code Centre two years ago and have been using it regularly since with Windows 2000 Server, IIS 5.0 and the .NET Framework 1.0. However, I am unable to port the Survey solution to a new production Web server, running Windows Server 2003, IIS 6.0 and the .NET Framework 1.1, due to a error when setting the Nested property of a DataRelation to true in the AdjustQuestionPrimaryKey() sub-routine ("A column named 'Answer' already belongs to this DataTable: cannot set a nested table name to the same name"). There are a few reports of a similar issue elsewhere on the Web but I have yet to find any that refer to a satisfactory resolution. Given that the Survey and Survey Admin samples appear to have disappeared relatively recently from MSDN, I was wondering whether anyone can offer an explanation for this occurrence or, alternatively (and preferably!), has a solution to the problem. I should add that I have yet to apply service pack 1 for the .NET Framework 1.1 but did not notice any documented connection between the issues that it addresses and the difficulty I have reported.

Regards

GazHi Gaz,

Yeah, I had it removed as too many people were having problems with it, and I didn't have the time to go through the code and fix all of the migration issues. There was one fix I did that may work for you, however. In the response.xsd file, change the definition of Answer from:

<xs:element name="Answer" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Id" form="unqualified" type="xs:int" />
<xs:attribute name="Text" form="unqualified" type="xs:string" />
</xs:complexType>
</xs:element
to a complex type with a different name. Actually, here's the whole file:
<?xml version="1.0" ?>
<xs:schema id="NewDataSet" targetNamespace="http://tempuri.org/SampleResponse.xsd"
xmlns:mstns="http://tempuri.org/SampleResponse.xsd"
xmlns="http://tempuri.org/SampleResponse.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xs:complexType name="AnswerType">
<xs:attribute name="Id" form="unqualified" type="xs:int" />
<xs:attribute name="Text" form="unqualified" type="xs:string" />
</xs:complexType>
<xs:element name="SurveyResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Question" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Answer" minOccurs="0" maxOccurs="unbounded" type="AnswerType" />
</xs:sequence>
<xs:attribute name="Id" form="unqualified" type="xs:int" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Id" form="unqualified" type="xs:string" />
</xs:complexType>
<xs:key name="SurveyResponseQuestionKey" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Question" />
<xs:field xpath="@.Id" />
</xs:key>
<xs:key name="SurveyResponseAnswerKey" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Answer" />
<xs:field xpath="@.Id" />
</xs:key>
<xs:key name="SurveyResponseKey1" msdata:PrimaryKey="true">
<xs:selector xpath=".//Question" />
<xs:field xpath="@.Id" />
</xs:key>
<xs:key name="SurveyResponseKey2" msdata:PrimaryKey="true">
<xs:selector xpath=".//Answer" />
<xs:field xpath="@.Id" />
</xs:key>
</xs:element>
<xs:element name="BaseResponseDataSet" msdata:IsDataSet="true" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element ref="SurveyResponse" />
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema
Alternately, you might want to look at nSurvey, which is a full featured survey application.