Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts

Saturday, March 31, 2012

Web Server NOT grabbing File1.PostedFile

Help Needed Please!!! With a VB.NET web application, I am trying to
save pictures and files to a directory on the web server. However, the
web server is not grabbing the Posted Files. For example:
File1.PostedFile Is Nothing = True. Like it always seems to go, this
page and the File1.PostedFile method works perfectly fine on my
development machine(XP Pro, VS.NEt, .Net 1.1). Is there any causes or
reason why the web server(2000 Server, .Net 1.0) is not getting the
File1.PostedFile.

Any ideas as to why this will work on my development machine and not
off the server. Possibly security issues on server? I am really
stumped because I have used the same methods before on other servers.

Thanks,

Brett

How I narrowed down to the above problem:
http://groups-beta.google.com/group...63b135dae60c1c1Does your form have enctype="multipart/form-data" attribute?

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU

<bwalke@.lbrspec.com> wrote in message
news:1113404938.416180.252200@.l41g2000cwc.googlegr oups.com...
> Help Needed Please!!! With a VB.NET web application, I am trying to
> save pictures and files to a directory on the web server. However, the
> web server is not grabbing the Posted Files. For example:
> File1.PostedFile Is Nothing = True. Like it always seems to go, this
> page and the File1.PostedFile method works perfectly fine on my
> development machine(XP Pro, VS.NEt, .Net 1.1). Is there any causes or
> reason why the web server(2000 Server, .Net 1.0) is not getting the
> File1.PostedFile.
> Any ideas as to why this will work on my development machine and not
> off the server. Possibly security issues on server? I am really
> stumped because I have used the same methods before on other servers.
> Thanks,
> Brett
> How I narrowed down to the above problem:
> http://groups-beta.google.com/group...63b135dae60c1c1
No, I do not believe so. Where exactly do you put this?

Thanks for your help.
<form runat="server" enctype="multipart/form-data"...>
<%-- Controls go here --%>
</form
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU

<bwalke@.lbrspec.com> wrote in message
news:1113407675.740786.76040@.g14g2000cwa.googlegro ups.com...
> No, I do not believe so. Where exactly do you put this?
> Thanks for your help.
thanks that did the trick!!

Web Server NOT grabbing File1.PostedFile

Help Needed Please!!! With a VB.NET web application, I am trying to
save pictures and files to a directory on the web server. However, the
web server is not grabbing the Posted Files. For example:
File1.PostedFile Is Nothing = True. Like it always seems to go, this
page and the File1.PostedFile method works perfectly fine on my
development machine(XP Pro, VS.NEt, .Net 1.1). Is there any causes or
reason why the web server(2000 Server, .Net 1.0) is not getting the
File1.PostedFile.
Any ideas as to why this will work on my development machine and not
off the server. Possibly security issues on server? I am really
stumped because I have used the same methods before on other servers.
Thanks,
Brett
How I narrowed down to the above problem:
http://groups-beta.google.com/group...63b135dae60c1c1Does your form have enctype="multipart/form-data" attribute?
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
<bwalke@.lbrspec.com> wrote in message
news:1113404938.416180.252200@.l41g2000cwc.googlegroups.com...
> Help Needed Please!!! With a VB.NET web application, I am trying to
> save pictures and files to a directory on the web server. However, the
> web server is not grabbing the Posted Files. For example:
> File1.PostedFile Is Nothing = True. Like it always seems to go, this
> page and the File1.PostedFile method works perfectly fine on my
> development machine(XP Pro, VS.NEt, .Net 1.1). Is there any causes or
> reason why the web server(2000 Server, .Net 1.0) is not getting the
> File1.PostedFile.
> Any ideas as to why this will work on my development machine and not
> off the server. Possibly security issues on server? I am really
> stumped because I have used the same methods before on other servers.
> Thanks,
> Brett
> How I narrowed down to the above problem:
> http://groups-beta.google.com/group...63b135dae60c1c1
>
No, I do not believe so. Where exactly do you put this?
Thanks for your help.
<form runat="server" enctype="multipart/form-data"...>
<%-- Controls go here --%>
</form>
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
<bwalke@.lbrspec.com> wrote in message
news:1113407675.740786.76040@.g14g2000cwa.googlegroups.com...
> No, I do not believe so. Where exactly do you put this?
> Thanks for your help.
>
thanks that did the trick!!

Monday, March 26, 2012

web service authentication with active directory

hi!!
i have a windows app that uses web serivces to access data and i use
integrated windows to authenticate.
is it a way to authenticate with users in active directory ?
and how do i do that ?There is already a sample available in Quickstart guide...
http://samples.gotdotnet.com/quicks...reservices.aspx
Regards
Jignesh Desai
www.dotnetjini.com
"Geir Sanne" <GeirSanne@.discussions.microsoft.com> wrote in message
news:749DAF3F-6165-4699-B554-6D6E82DE52A0@.microsoft.com...
> hi!!
> i have a windows app that uses web serivces to access data and i use
> integrated windows to authenticate.
> is it a way to authenticate with users in active directory ?
> and how do i do that ?
hi!!
i tried the guide, but it didnt help me.
ive tried to use WSE and the UsernameTokenManager.
This works fine, except that if i dont pass any UsernameToken to the service
the user is acceptet. You know how to make the webservice call the
UsernameTokenManager even if a UsernameToken isnt passed ?
regards
geir sanne
"Jignesh Desai" wrote:

> There is already a sample available in Quickstart guide...
> http://samples.gotdotnet.com/quicks...reservices.aspx
> Regards
> Jignesh Desai
> www.dotnetjini.com
>

web service authentication with active directory

hi!!

i have a windows app that uses web serivces to access data and i use
integrated windows to authenticate.
is it a way to authenticate with users in active directory ?
and how do i do that ?There is already a sample available in Quickstart guide...

http://samples.gotdotnet.com/quicks...reservices.aspx

Regards
Jignesh Desai
www.dotnetjini.com

"Geir Sanne" <GeirSanne@.discussions.microsoft.com> wrote in message
news:749DAF3F-6165-4699-B554-6D6E82DE52A0@.microsoft.com...
> hi!!
> i have a windows app that uses web serivces to access data and i use
> integrated windows to authenticate.
> is it a way to authenticate with users in active directory ?
> and how do i do that ?
hi!!

i tried the guide, but it didnt help me.

ive tried to use WSE and the UsernameTokenManager.
This works fine, except that if i dont pass any UsernameToken to the service
the user is acceptet. You know how to make the webservice call the
UsernameTokenManager even if a UsernameToken isnt passed ?

regards
geir sanne

"Jignesh Desai" wrote:

> There is already a sample available in Quickstart guide...
> http://samples.gotdotnet.com/quicks...reservices.aspx
> Regards
> Jignesh Desai
> www.dotnetjini.com
>

Web Service Custom Installer / Action / Virtual Directory

Taking a page from the book of Great Ebay Auction Titling, I've jammed most of the relevent key words into my subject in hopes that someone out there who has a definitive answer to my question will notice this post.

This is not exactly a 'Getting Started' sort of a question, so please forgive me if I decided to post my plea for help in a highly trafficked area after witnessing multiple unanswered posts on this same topic in various other forums.

Does anybody out there have any idea how to customize a setup project so that it creates a virtual directory at the location of my choosing and subsequently installs my web application there?

Or perhaps someone knows how to programmatically configure IIS in general using only the classes provided in the CLR?

I don't want to install under the wwwroot directory, and reconfiguring IIS on the server to which I am deploying before I install my application is not an acceptible solution. The idea here is to create a deployment package that automates the IIS configuration process so that it can be run without user intervention.

The setup packages for the IBuySpy Portal and Store applications create and configure the virtual directories for their applications, and yet I can find no clear example of how to accomplish this.

If someone can help me with this, I will gladly write a comprehensive article on the topic and post it on every site that will let me. I've seen multiple posts on this topic that are over a year old and still have no response at all.

Anyone? Anyone? Bueller?Hi,

Take a look @.Deploying Web Applications using Visual Studio .NET

HTH

Web Service directory

How do I get the (local) directory my web serice is running from?
Directory.GetCurrentDirectory() it returns the System32 directory. I'm
looking for the "C:\Inetpub\wwwroot\MyService\" directory. Thanks for any
help.There is a good listing of different paths you can examine on Rick
Strahl's blog:
http://west-wind.com/weblog/posts/269.aspx
I believe you are looking for Request.PhysicalPath.
HTH,
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 28 Apr 2005 23:20:23 -0400, "Jed Ozone" <jed ozone@.yahoo.com>
wrote:

>How do I get the (local) directory my web serice is running from?
>Directory.GetCurrentDirectory() it returns the System32 directory. I'm
>looking for the "C:\Inetpub\wwwroot\MyService\" directory. Thanks for any
>help.
>

Web Service directory

How do I get the (local) directory my web serice is running from?
Directory.GetCurrentDirectory() it returns the System32 directory. I'm
looking for the "C:\Inetpub\wwwroot\MyService\" directory. Thanks for any
help.There is a good listing of different paths you can examine on Rick
Strahl's blog:

http://west-wind.com/weblog/posts/269.aspx

I believe you are looking for Request.PhysicalPath.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 28 Apr 2005 23:20:23 -0400, "Jed Ozone" <jed ozone@.yahoo.com>
wrote:

>How do I get the (local) directory my web serice is running from?
>Directory.GetCurrentDirectory() it returns the System32 directory. I'm
>looking for the "C:\Inetpub\wwwroot\MyService\" directory. Thanks for any
>help.

Web service does not show up while adding web reference

Hi,
If I create a Virtual directory with application name
programmatically it will not show up in the available web
services while adding web reference(Dynamic discovery
fails).

Where as if I create the virtual directory manually it
will shown up while adding web reference.

I have used the following code to create it
programmatically on IIS 5.0

I have checked the property pages of virtual directory
created using both the methods they look same.

Set IIsWebVDirRootObj = GetObject
("IIS://LocalHost/W3SVC/1/Root")
Set IIsWebVDirObj = IIsWebVDirRootObj.Create
("IIsWebVirtualDir", "MySecureAPP")

IIsWebVDirObj.Put "Path", "C:\MySecure"
IIsWebVDirObj.Put "AccessRead", True
IIsWebVDirObj.Put "AccessScript", True
IIsWebVDirObj.Put "AppIsolated",2

IIsWebVDirObj.AppCreate2 1
IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
IIsWebVDirObj.SetInfo

Thanks
KiranJust wondering is this in WSH?
What Language?

"Kiran" <kiranjoseph74@.hotmail.com> wrote in message
news:011501c36807$f4561d90$a401280a@.phx.gbl...
> Hi,
> If I create a Virtual directory with application name
> programmatically it will not show up in the available web
> services while adding web reference(Dynamic discovery
> fails).
> Where as if I create the virtual directory manually it
> will shown up while adding web reference.
> I have used the following code to create it
> programmatically on IIS 5.0
> I have checked the property pages of virtual directory
> created using both the methods they look same.
> Set IIsWebVDirRootObj = GetObject
> ("IIS://LocalHost/W3SVC/1/Root")
> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
> ("IIsWebVirtualDir", "MySecureAPP")
> IIsWebVDirObj.Put "Path", "C:\MySecure"
> IIsWebVDirObj.Put "AccessRead", True
> IIsWebVDirObj.Put "AccessScript", True
> IIsWebVDirObj.Put "AppIsolated",2
> IIsWebVDirObj.AppCreate2 1
> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
> IIsWebVDirObj.SetInfo
>
> Thanks
> Kiran
This is VbScript that uses ADSI objects.
I have tried with C# too, but the same problem exiits

C# Code
DirectoryEntry IISRoot = new DirectoryEntry("IIS://" +
m_strServer + "/W3SVC/1/Root");
DirectoryEntry newDir =
IISRoot.Children.Add( m_strVDirName, "IIsWebVirtualDir");
newDir.Properties["Path"]
[0] = m_strVDirPath;
newDir.Properties
["AccessFlags"][0] = "513";
newDir.Properties
["AppIsolated"][0] = "2";
//newDir.Properties
["AccessWrite"][0] = "True";
newDir.Properties
["AppFriendlyName"][0] = m_strVDirName;
newDir.Invoke
( "AppCreate", true );
newDir.CommitChanges();

Thanks
Kiran

>--Original Message--
>Just wondering is this in WSH?
>What Language?
>"Kiran" <kiranjoseph74@.hotmail.com> wrote in message
>news:011501c36807$f4561d90$a401280a@.phx.gbl...
>> Hi,
>> If I create a Virtual directory with application name
>> programmatically it will not show up in the available
web
>> services while adding web reference(Dynamic discovery
>> fails).
>>
>> Where as if I create the virtual directory manually it
>> will shown up while adding web reference.
>>
>> I have used the following code to create it
>> programmatically on IIS 5.0
>>
>> I have checked the property pages of virtual directory
>> created using both the methods they look same.
>>
>> Set IIsWebVDirRootObj = GetObject
>> ("IIS://LocalHost/W3SVC/1/Root")
>> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
>> ("IIsWebVirtualDir", "MySecureAPP")
>>
>> IIsWebVDirObj.Put "Path", "C:\MySecure"
>> IIsWebVDirObj.Put "AccessRead", True
>> IIsWebVDirObj.Put "AccessScript", True
>> IIsWebVDirObj.Put "AppIsolated",2
>>
>> IIsWebVDirObj.AppCreate2 1
>> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
>> IIsWebVDirObj.SetInfo
>>
>>
>>
>> Thanks
>> Kiran
>>
>>
>
>.
Did you have any asmx files in the Virtual folder? Additionally, What did
you mean "Dynamic discovery", "Browse to
Web services on the local machine " in VS.NET 2003?

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/s...ns/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Saturday, March 24, 2012

Web service problem

Hi all,

I have another question regarding webservices. I have one set up to access the active directory. As a test i have put in the following code as a method to see if it works.

[WebMethod(Description="Test function to test AD access")]
public string testFunction(string username, string pwd)
{
string testStr = string.Empty;
DirectoryEntry de = new DirectoryEntry("LDAP://DC=optos,DC=eye" ,username ,pwd);
foreach(DirectoryEntry child in de.Children)
{
testStr = testStr + "<BR>" + child.Name.ToString();
}

return testStr;
}

I have a similar piece of code on the form where i call the web service for, and this is where the problem lies.

The code runs fine on the form which calls the web service. When i call the web service however i get the following error:

<i>"Server was unable to process request. --> The specified domain either does not exist or could not be contacted"</i>

The security on the main form is set to impersonate=true and anonymous access has been removed from the IIS properties for the app. On the web service, again impersonte=true but this time anonymous is checked. When it is unchecked i get Access denied errors.

Does anyone have any ideas why this is happening.

Thanks,

GrantWeb services don't run under the context of the logged in user. They run under the context of the caller. This means that you will need to pass credentials to the web service.

http://support.microsoft.com/default.aspx?scid=kb;en-us;813834
Hi Mendhak,

That was a seriously quick response, thank you.

I'll look over the link and see if i can't get something working. I'll post back either way to let you know.

Cheers

Grant
Thanks Mendhak, that worked perfectly.