C#,vb.net,MVC,Jquery,javascript,jscript,vbscript,html,vb,sharepoint,COM,WPF,WCF,Wwf,Asp,Asp.net,questions & answers,

Latest in Sports

Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Wednesday, December 31, 2014

Scenario
For uploading large files using WCF service, Microsoft recommends to use Stream objects and implement streamed transfer mode. We created a sample POC using
Message Contracts passing streams and writing a stream to a folder. We also created a Sample Console application to consume the WCF service and to write large files
to a folder. Both WCF service and Sample Console application were part of a single solution file.

Issue
We started the WCF service over the Visual Studio Development Server and then run the console application to test the WCF service. We repeatedly got the
following error:
The remote server returned an error: (400) Bad Request
We checked all the configurations in both Client and Service and everything was fine.  One major limitation was we were not able to debug the service, since it was
not hitting the breakpoint.

Resolution
We then hosted the WCF service on IIS and the service started working. We were able to debug the code and the functionality worked as expected.

The recommendation would be to always host WCF service on IIS, since there are some limitations while hosting it on File-System. When the WCF service is hosted
on File-System, we were unable to debug the code, even if we attach the process.  We were spending a lot of time in analysis and debugging even when there
was no issue.

Tuesday, October 14, 2014

SOLUTION 1:
Out the box MSI installers are discontinued from VSTS2012, so you won’t be able to use those, however you have option to revert back to VSTS 2010 just for deployment project.
For VSTS2012, I recommend using WIX, you could google out WIX, there is plenty of resources available. For quickstart below is some important WIX steps –
 
   <Directory Id="Example" Name=" Example ">
                 //copy all the Assemblies
            <Component Id='Copy Assemblies' Guid='{Enter your GUID}'>
              <File Id="Sample.dll" Source ="$(TargetDir)Sample.dll"/>
            </Component>
            </Directory>-->
           </Directory>
                 //copy all the Service specific files
          <Component Id='Copy Service File' Guid='{Enter your GUID}'>
            <File Id="Service1.svc" Source ="Service1.svc"/>
            <File Id="Web.Config" Source ="Web.config"/>
          </Component>
                 //Create IIS component like Application pool,website nd virtual directory
          <Component Id="IISComponent" Guid="{Enter your GUID}" KeyPath="yes">
            <iis:WebAppPool Id="WebAppPool" Name="ServicePool" ManagedRuntimeVersion="v4.0" IdleTimeout="0" RecycleMinutes="0" ManagedPipelineMode="integrated">
            </iis:WebAppPool>
            <iis:WebSite Id ='Service'  Directory ='INSTALLATION FOLDER' Description'Website Description'>
                <iis:WebAddress Id="AllUnassigned" Port="8019" />
            </iis:WebSite>
            <iis:WebVirtualDir Id="Virtual" Alias="VD" Directory="INSTALLATION FOLDER"  WebSite="Service">               
              <iis:WebApplication Id="MyWebAppApplication" WebAppPool="WebAppPool" Name="WebSiteVirtual" />
              <iis:WebDirProperties Id="MyWebSite_Properties" AnonymousAccess="yes" WindowsAuthentication="no" />
            </iis:WebVirtualDir>      
          </Component>
        </Directory>
 
 

SOLUTION 2:
n order to achieve this you can write your service as an Installer Class custom action and install it using a ".NET Installer Class Action" predefined custom action. Also, you can take a look on "How to: Host a WCF Service in a Managed Windows Service" article which should be useful for you.

Friday, January 24, 2014

We are calling AX WCF service from ASP.NET application hosted in IIS.

 We are able to read the journals and invoice items without any issue. But, we are getting “User XYZ not found” when submitting invoice updates to AX.

 Below are the steps we are following
 
1.      ASP.NET application uses windows authentication

2.      ASP.NET application’s app pool runs using the account XYZ

3.      The account XYZ has been added to intermediary trusted user in AX and it has been assigned to “System Administrator” role.

 Kindly let me know if there is any solution for this issue.

Monday, October 1, 2012

Hi,
 
I have one application which is deployed on IIS6 environment and it is working fine. When I deployed on IIS7 environment default page is working fine, but Menu or other link is not working.
 
For Example: I have created virtual directory “TestApp” in IIS 7 environment. when I browse that virtual directory, it  generates the URL as https://localhost/TestApp/Default.aspx. But when I click on menu or other link which is mentioned in default page then it generates the  link as http://localhost/sample.aspx.  it is not giving virtual directory name.  Is there any other configuration needed in IIS7
 
Any help would be greatly appreciated.
 
-Yogesh
 
 
SOLUTION1:
 
Try to give the link  Url as  “ ~/sample.aspx”

Tuesday, August 21, 2012

Saturday, August 11, 2012

After launching fiddler on my system if I try to browse any site iam getting  404 error, and fiddler is unable to capture the traffic.
 
Has anyone come across this issue, I have done the basic settings in fiddler options and also the LAN settings .
 
-Anitha

Wednesday, May 30, 2012

creating ASP.net web application with Crystal reports (2010). My application is working fine in my location system. When I deployed the same in  IIS 7 (Windows 7), crystal reports are loading fine initially(when page loads) but if I click on next button it is asking for database logon details. Below is my sample code, in GetReport() method I’m retrieving data from the database into report document then loading the crystal report and saving that report document into session. Please help on this issue.

Tuesday, May 22, 2012

I am working on a client machine and every time I host a website, it keeps giving me an IIS error.
 
The error is: Failed to access IIS metabase.
 
If anyone knows how to solve this error
 
SOLUTION 1:
 
You can try using following command, for the account that is failing to access the IIS metabase (Microsoft Site):
 
aspnet_regiis -ga <WindowsUserAccount>
 
This doesn't always seem to work however as there may be a problem with the installation of the 2.0 NET framework. Browsing to the appropriate .NET folder (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 for example) and running the following command will reinstall that version of IIS and typically resolves this problem.
 
aspnet_regiis –i
 
Note: running a repair on the .NET 2.0 component from the 'Add and Remove Programs' interface may not resolve this problem.
 
SOLUTION 2:
 
You can try the following steps :-
 
1. Unregistered all the versions of ASP.NET with command "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ua".
2. Deleted the ASPNET account from "Local Users and Group – Users".
3. Then registered ASP.NET 2.0 with IIS using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –i".
4. Gave permissions to the ASPNET account using "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –ga machinename\ASPNET".
5. Reset the IIS and that resolved the issue for ASP.NET 2.0.
6. We registered ASP.NET 1.1 with IIS as well using command "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis –i".
7. Reset the IIS.
 
Hope this will solve the issue!..