| Elczar 的个人资料Sharing Points { }照片日志列表 | 帮助 |
|
|
12月20日 WSS 3.0 in Windows Server 2008 RC1As I have committed in my previous posting, http://elczara.spaces.live.com/blog/cns!554EC06D366AC9D5!214.entry, herewith is an update on WSS 3.0 implementation on Windows Server 2008. SharePoint bit is no longer available in Windows Server 2008 RC1. We need to install it separately as we did before. However, WSS 3.0 without service pack hasv know compatability issue with Windows Server 2008 RC1, thus we need to install WSS 3.0 "with" SP1 slipstream. It is available at: 32-bit Version : http://www.microsoft.com/downloads/details.aspx?FamilyId=EF93E453-75F1-45DF-8C6F-4565E8549C2A&displaylang=en 64-bit Version : http://www.microsoft.com/downloads/details.aspx?FamilyId=9FB41E51-CB03-4B47-B89A-396786492CBA&displaylang=en Is MOSS 2007 "with" SP1 slipstream already available? The Service Pack 1 includes the following: 1. Support for Windows Server 2008 2. Support for Internet Information Services (IIS) 7 3. Support for creating Web Parts by using AJAX 4. New operations and properties for the Stsadm command line tool 5. Includes over 60 hotfixes across all areas of SharePoint Products and Technologies
11月12日 IIS 7.0 Configuration System
IIS 7.0 Configuration System Let us step one level higher in our exploration. At the base of Internet Information Services 7.0 in Windows Server 2008, is an innovated and XML-based configuration system is established. Unlike the IIS 6.0 metabase, the entire configuration state is in files and no in-memory configuration store is used. With an administrative protection, the configuration is portable by merely copying it to other Web servers or sharing it. Nevertheless, the same configuration file could now be centrally shared across the Web servers group. Configuration Levels The server-wide configuration setting is stored in applicationHost.config file located at %windir%\System32\inetsrv\config directory which could be delegated in the <system.webServer> section of the root web.config file for application level settings. Moreover, the machine.config and web.config files located at %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG\ directory remain the global configuration settings for .NET Framework and ASP.NET respectively, and the <system.web> section of the root <web.config> continues to provide the application level settings. Organization of Settings The configuration file is logically organized by section. A section is an independent group of settings that defines the operation and extensibility of the server or an application. Being an independent unit, it cannot be nested. Below is an illustration: <applicationPools> <add name="DefaultAppPool" /> <add name="Classic .NET AppPool" managedPipelineMode="Classic" /> <applicationPoolDefaults> <processModel identityType="NetworkService" /> </applicationPoolDefaults> </applicationPools> Sections can be assembled into a section group. But unlike a section, a section group does not define any server nor application operation. Its sole purpose is to hierarchically organize logically-related sections. For this reason, it could be nested for further groupings. In the applicationHost.config, the sections groupings are defined through <configSections>. Below is the illustration: <configSections> <sectionGroup name="system.applicationHost"> <section name="applicationPools" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> … </sectionGroup> <sectionGroup name="system.webServer"> <section name="asp" overrideModeDefault="Deny" /> … </sectionGroup> </configSections> applicationHost Section Groups The applicationHost.config, as we have mentioned earlier, contains the server-wide configuration settings/sections that are group into system.applicationHost and system.webServer. The former contains global settings employed by the Windows Process Activation Service, while the later is used by the Web server engine and modules. Aside from the section groups, we can incorporate a <location> tag in the configuration file. It is often employed for locking and unlocking a configuration section, to manage the application level delegation. It is done by defining the overrideMode value of a specific site. In the illustration below, the default document could not be changed in the root web.config file; otherwise, it would fire an exception. <location path="Sample Web Site" overrideMode="Deny"> <system.webServer> <defaultDocument enabled="true"> <files> <clear /> <add value="default.aspx" /> </files> </defaultDocument> </system.webServer> </location> Schema and Other Configuration Files The configuration system is charted by a declarative schema located at %windir%\System32\inetsrv\config\schema directory, including IIS_schema.xml for IIS configuration settings, ASPNET_schema.xml for ASP.NET configuration settings, and FX_schema.xml for other .NET Framework configuration settings. Note that we need not to make any changes on the schema files. However, if necessary for us to create a custom section, we could add a separate schema file on the same directory. Aside for the applicationHost.xml file, we could experience the presence of administration.xml and redirection.xml configuration files in the %windir%\System32\inetsrv\config directory. The former holds the settings necessary for the Internet Information Services Manager tool, and the later contains settings necessary to point a Web server to a remote/shared configuration files and schema. Hoping I have shared something.
11月7日 IIS 7.0 - ASP.NET Integration
IIS 7.0 – ASP.NET Integration This paper is an attempt to précis the ground-breaking integration of IIS 7.0 and ASP.NET in the Web sever core of Windows Server 2008, emphasizing the significant facets engrossed by the integration, and a demonstration that implements ASP.NET Forms Authentication for non-ASP.NET content types. Significant Facets In my paper on Web Server in Windows Server 2008, I have pointed out that ASP.NET is no longer employed with the Web server as a standalone application framework. It serves by now as a platform for extending the IIS Web server, facilitating ASP.NET components to turn into constituents for its request processing pipeline. In the previous versions of IIS, ASP.NET request is passing through a native IIS processing before it will be forwarded to an ASP.NET ISAPI assembly (aspnet_asapi.dll) for managed code processing. On the other hand, other content types may be accommodated through native IIS request processing, like in the case of static file, or by other ISAPI extensions. Thus, non-ASP.NET requests could not enjoy the ASP.NET managed modules. In IIS 7.0, however, ASP.NET is no longer implemented as an IIS ISAPI extension. The native process model of IIS and the managed process model of ASP.NET are unified into a sole process model. With the integration of ASP.NET runtime, IIS 7.0 made both native (C++ API) and managed (ASP.NET) modules available to any type of request. In other words, ASP.NET modules are now relevant to any content type including ASPX page, HTML page, and other content types. Additionally, this integration results to a unified modules and handlers configuration. It has eliminated, furthermore, duplication of some strides in the request processing pipeline, such as authentication and authorization. Demonstration 1. As we have mentioned earlier, this section will demonstrate the extensibility of ASP.NET Forms Authentication to non-ASP.NET content types. We will start by creating a database using ASP.NET SQL Server Setup Wizard. To do this, let us open our Visual Studio Command Prompt and execute aspnet_regsql. In this demonstration, we will name our database as ASPNETDatabase. 2. Using Visual Studio 2005, we will create a Web site and call it ASPNETWebSite. 3. Subsequently, we will add two static files: an HTML page with a title of HTML Page, and an image file. 4. After that, we will add a Login.aspx page, and we will include a Login control as: <asp:Login ID="Login1" runat="server"></asp:Login> 5. To preliminary implement Forms Authentication to our Web application, let us open our web.config file and change the <authentication> mode value from Windows to Forms, then we will add some values to our <authorization> element. The results will be:
<authentication mode="Forms"/> <authorization> <deny users="?"/> </authorization>
6. After completing the previous task, we will open our Intenet Information Services Manager and add a Web site, we will name it ASPNET Web Site, pointing the Content Directory to the location of our Web application. 7. In the ASP.NET area of our ASPNET Web Site Home, let us do the following: a. Set Connection String: Server=ServerName;Database=ASPNETDatabase;User ID=UserName;Password=Password b. Add .NET User 8. Lastly, we will add some values in the <modules> section of our applicationHost.config to make it <modules runAllManagedModulesForAllRequests="true">. It is located at %windir%\System32\inetsrv\config\applicationHost.config. By default, even though that our application pool is set to Integrated mode, ASP.NET modules are configured with managedHandler precondition. It means that only ASP.NET request will be carried out by managed modules. Now, if we want to employ ASP.NET modules to all our requests, we can write the following in the web.config file of our Web application right after the <configuration> element: <system.webServer> <modules> <remove name="FormsAuthenticationModule" /> <add name="FormsAuthenticationModule" type="System.Web.Security.FormsAuthenticationModule" /> <remove name="UrlAuthorization" /> <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /> </modules> </system.webServer>
Otherwise, like what we have did in this step, we can set the runAllManagedModulesForAllRequests of the <modules> element to true to shape all managed modules to carry out any type of request notwithstanding of their repective managedHandler precondition.
9. At this moment, we will notice the following: a. A corresponding application pool is created with an Integrated Managed Pipeline Mode. This means the ASPNET Web Site we have created benefits the IIS 7.0 and ASP.NET integration. Thus, ASP.NET forms authentication is functional even to our HTML pages and image file. To explore, you can downgrade it to Classic mode, and browse the site. There you will notice that the HTML page and the image file do not require authentication. b. Since our Web application is configured for forms authentication, Forms Authentication component is coordinately enabled in IIS, and the connection string we have set is automatically reflected in web.config file of our Web application. This underlines the unified configuration results of the integration. c. The user we have provisioned is stored in the aspnet_Users table of our ASPNETDatabase. 10. Now, its time for us to explore http://Server Name:Port Number/File Name to appreciate the extensibility of ASP.NET Forms Authentication. Hoping to share you something. 11月5日 WCF in Windows Server 2008 - Part II
WCF in Windows Server 2008 Part II of II : non-HTTP Transports Groundwork As we have brought up previously, the objective of this piece is to carve up basic and high-level considerations on Windows Communication Foundation in Windows Server 2008. We have focused on HTTP transport implementation in Part I, and we will hub on non-HTTP transports in this part. Along the demonstration section, we will seek to enhance our previous WCF service and WPF client applications, then we will attempt to put in plain words some of the fundamental codes. Review In the previous part, we have given attention on one of the three constituted technologies of Application Server Core in Windows Server 2008, the Windows Communication Foundation. It is a new service-oriented programming model, edged by .NET Framework 3.0, to intercommunicate and interoperate with other applications. We have also mentioned that in hosting a distributed WCF application in the Internet Information Services 7.0, it entails employment of Windows Process Activation Service (WAS) to facilitate activation and communication over network protocols including HTTP, NET.TCP, NET.PIPE, and NET.MSMQ.
Non-HTTP Transports In TCP-based communication, the messaging session between machines is established before exchanging data. Each machine is identified through a logical IP address. In the process of delivering a unit of information on a network, the TCP manages the fragmentation of message into packets (a unit of transported information), and the reassembly of the same message from packets. Moreover, the same protocol resends lost packets and guarantees that no data fragment is duplicated. In the heart of WCF TCP transport is the TCP Port Sharing service. It is a Windows service that allows TCP ports, over Intranet, to be shared across applications that are using WCF for communication. By principle, it is faster than HTTP protocol, but it is no more than for WCF-WCF communication. A named pipe, on the other hand, is an object in the Windows operating system kernel, including a section of shared memory. It can be employed to grant communication channel between processes on the same computer or between processes on different computers across a network. For WCF, moreover, it is employed using net.pipe schema and ideal for an on-machine implementation of message delivery between WCF applications. MSMQ, running as an NT service, is one of the features of Windows Server 2008. It is employed by WCF for its queued communication using net.msmq schema. The MSMQ Managers manages message-transfer from a Transmission Queue to a Target Queue. Unlike other transports, queued transport puts into operation the isolation between service, client, and transport. Hence, the transacting parties can fall short without producing an effect on the real communication. Furthermore, it provides reliable communication in spite of failures of the sender and receiver by backing up the message in their corresponding message store. To endow with consistent communication, MSMQ employs transactional messaging where message is communicated under a transaction. Transaction is a set of operations designed in such a way that if one operation fails, the entire transaction will not be sent to queue. Additionally, MSMQ provides an asynchronous communication pattern. Hence, the sender needs not to wait for the message to be received and processed by the receiver. Sent message may remain in the Transmission Queue, based on the defined value, until it is sent to the Target Queue. Else, it will be transferred to a Dead Letter Queue. Demonstration 1. Primarily, we will verify if non-HTTP protocol is supported. Let us open our Internet Information Services Manager. Click our WCFService site, then click Bindings. In the Site Bindings dialog box we could identify the protocols that are supported. 2. To complete the configuration, we will open the applicationHost.config file of our IIS at %SystemDrive%\Windows\System32\inetsrv\config directory and add some values to the <enabledProtocols> tag of our Web site. In this case, the results will be:
<site name="Default Web Site" id="1" serverAutoStart="true"> <application path="/WCFService" applicationPool="DefaultAppPool" enabledProtocols="http,net.tcp,net.pipe,net.msmq"> <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\WCFService" /> </application> <bindings> <binding protocol="https" bindingInformation="*:443:" /> <binding protocol="http" bindingInformation="*:80:" /> <binding protocol="net.pipe" bindingInformation="*" /> <binding protocol="net.msmq" bindingInformation="localhost" /> <binding protocol="net.tcp" bindingInformation="808:*" /> </bindings> </site>
NOTE: Enabled Protocols property does not have corresponding user interface in Windows Server 2008 Beta 3.
3. Now we will open the WCF Service application we have created in Part I. 4. In the Solution Explorer, let us open the Service.cs file.
Notice that the System.ServiceModel is being referenced. It is the namespace that brings Windows Communication Foundation to existence. As the name suggests, this is what we referred as WCF service model.
Other noticeable attributes that characterizes the service model are the [ServiceContract] annotation for the interface (dispatching) and the [DataContract] annotation for the data definition (serialization).
5. Let us add a Namespace to our [ServiceContract] attribute and an Action named parameter to our [OperationContract] attribute. The results will be: [ServiceContract(Namespace="http://tempuri.org/IService")] public interface IService { [OperationContract(Action="Operation:String")] string Operation(string Value); [OperationContract(Action="DataOperation:String")] string DataOperation(Profile Value); } An incoming SOAP message is dispatched to a corresponding method based on the Action attribute of an operation contract. Thus, a message with Operation:String action is identified with Operation method, its target operation contract.
6. Upon enhancing our service contract, let us as well carry out basic enhancement on our [DataContract] attribute by adding a Namespace named parameter and some named parameters to our [DataMember] attribute. The results will be: [DataContract(Namespace="http://tempuri.org/Profile")] public class Profile { string firstname; string lastname;
[DataMember(Name="First", Order=0)] public string FirstName { get { return firstname; } set { firstname = value; } }
[DataMember(Name = "Second", Order = 1)] public string LastName { get { return lastname; } set { lastname = value; } } } The data contract is defined for serialization, where the data in the incoming SOAP message is mapped to a corresponding .NET object. In the above code, the SOAP payloads to the .NET string data type. The [DataContract] annotation signifies that we are using the default serialization engine of WCF. This engine serializes fields annotated with [DataMember]. By data contract, WCF service communication is directed through the SOAP body. If required to channel data through header, we can create a message contract and specify the message header and message body fields respectively. To wit: [MessageContract] public class Message { [MessageHeader] public HeaderMessage HeaderMessage;
[MessageBodyMember] public BodyMessage BodyMessage; } 7. The next step is to revisit the service implementation we have made in Part I and do an enhancement on its behavior through [ServiceBehavior] attribute. The results will be:
[ServiceBehavior(Namespace="http://tempuri.org/IService", ConcurrencyMode=ConcurrencyMode.Multiple)] public class Service : IService { public string Operation(string Value) { return "Hello: " + Value; }
public string DataOperation(Profile Value) { return "Hello: " + Value.FirstName + " " + Value.LastName; } } 8. Let us open our web.config file and extend our service endpoints to non-HTTP protocols by adding the following <endpoint> attributes to the <system.serviceModel> section of the file:
<endpoint binding="netTcpBinding" contract="IService" /> <endpoint binding="netNamedPipeBinding" contract="IService" /> Unlike in self-hosting, IIS hosting does not require us to specify the endpoint address because it is already provided by the location of our .svc file. 9. Lastly, let us to build our enhanced WCFService. 10. Now, let us open the WPFClient Windows application we have created in Part I and update our Proxy service reference. To do this, right-click the Proxy.map file under the Service References folder, then click Update Service Reference. 11. In app.config file, we will notice additional entries for net.tcp and net.pipes protocols in both <bindings> and <client> sections. Since the service contract interface could not be loaded with multiple <endpoint> configuration, we need to select preferred endpoint in the <client> section, then omit the others. 12. With this, we could rebuild and execute our application enjoying various types of communication protocols. 10月26日 WCF in Windows Server 2008 - Part I
WCF in Windows Server 2008 Part I of II : HTTP Transport Groundwork This piece intends to share with the community an elemental and high-level thought on Windows Communication Foundation in Windows Server 2008. It is composed of two parts, where Part I focuses on HTTP transport, and Part II focuses on non-HTTP transports implementation. Application Server Foundation Application Server Foundation, or also known as Application Server Core, is constituted of Application Server technologies provided in Windows Server 2008. The Application Server Core adjoins Microsoft .NET Framework 3.0, in addition to the baseline of .NET Framework 2.0. As an expanded server role that offers an integrated environment for business application, the Application Server is a composite of the following components: 1. Windows Communication Foundation (WCF) 2. Windows Workflow Foundation (WF) 3. Windows Presentation Foundation (WPF) Windows Communication Foundation is drawn to put forward a unified programming shape to intercommunicate and interoperate with other applications through a new service-oriented programming model. Moreover, Windows Workflow Foundation is the programming model and engine for developing workflow-enabled applications, while Windows Presentation Foundation is designed for building Windows smart-client applications. Windows Communication Foundation Windows Communication Foundation is a runtime and a set of APIs designed for sending and receiving messages across applications. As we have mentioned, it is a service-oriented programming model for intercommunication and interoperation with other systems, and considered as a great facilitator of SOA. Based on concept of message-based communication, the Windows Communication Foundation is architecturally layered into contract, service runtime, messaging, activation and hosting. To appreciate these layers, we need to put into consideration that communication in Windows Communication Foundation happens through endpoints. An endpoint contains of address, binding, and contract. An address is a network location where the endpoint is located, a binding defines how the endpoint communicates, and a contract defines what the endpoint is communicating. In the topmost layer of Windows Communication Foundation are the Contracts. This layer provides a high-level APIs including data contract, message contract, service contract, and the policy and binding of our service, where the data contract defines the message parameter, the message contact characterizes every message part, the service contact delineates the service method signature, and the policy and binding specifies the rules of communication. Being defined in XSD document, every message parameter of a service can be exposed to or consumed by any system that understands XML. The Service Runtime defines the runtime behavior of the service, including throttling behavior, error behavior, metabase behavior, instance behavior, message inspection, transaction behavior, dispatch behavior, concurrency behavior, and parameter filtering of the service. While a service message is communicated between endpoints, the Messaging stratum is composed of channels, also know channel stack, that processes this message. Zooming in on this layer, we have the transport protocols (HTTP, TCP, PIPE, and MSMQ), encoding (Binary, MTOM, Text, and XML), security and reliability (WS-Security, and WS-Reliability). Lastly, a service could be a self-hosted service or can be hosted by an agent, the Internet Information Services. In its Hosting and Activation architectural layer, a WCF application is also designed run as an executable, a Windows service, or a COM+ component. WCF and IIS 7.0 In hosting a distributed application built in Windows Communication Foundation, we need the services of Internet Information Services 7.0. The IIS 7.0, as the Web server of Windows Server 2008, employs Windows Process Activation Service (WAS) to facilitate activation and communication over network protocols supported by WCF – e.g. HTTP, NET.TCP, NET.PIPE, and NET.MSMQ. For a brief paper on Internet Information Services 7.0, please click here. Demonstration To complete this piece, we are going to walk in the course of HTTP implementation and we will attempt to ponder on non-HTTP implementation on my subsequent post. With the following considerations, we will be creating a WCF Service that defines our business logic and a WPF Windows Application that references our service. 1. We have installed Application Server and Web Server roles on our Windows Server 2008. 2. We have activated the IIS 6 Metabase Compatibility service of our Web Server. 3. For our purpose, we will be using the default components of WCF Service and Windows Application (WPF) templates in Microsoft Visual Studio 2005 as installed through WCF and WPF extensions.
Now, we will start by creating our WCF Service. 1. Let us open our Microsoft Visual Studio 2005. Start > All Programs > Microsoft Visual Studio 2005 > right-click Microsoft Visual Studio, then click Run as Administrator. 2. To create our WCF Service, let us click File > New > Web Site. 3. In the New Web Site dialog box, let us select WCF Service template, and our location to http://localhost/WCFService. Below is the illustration.
4. If you have not installed some of necessary Application Server and Web Server services, you will be prompted by a message as illustrated below.
5. Our WCF Service consists of contact, an interface class, and a configuration file that defines the services and service behaviors. And to make it personable, we will edit some items as:
In the Service.cs file: [ServiceContract()] public interface IService { [OperationContract] string Operation(string Value); [OperationContract] string DataOperation(Profile Value); }
public class Service : IService { public string Operation(string Value) { return "Hello: " + Value; } public string DataOperation(Profile Value) { return "Hello: " + Value.FirstName + " " + Value.LastName; } } [DataContract] public class Profile { string firstname; string lastname;
[DataMember] public string FirstName { get { return firstname;} set { firstname = value;} } [DataMember] public string LastName { get { return lastname;} set { lastname = value;} } }
In the Service.svc file: <% @ServiceHost Language=C# Debug="true" Service="Service" CodeBehind="~/App_Code/Service.cs" %>
In the web.config file: <system.serviceModel> <services> <service name="Service" behaviorConfiguration="returnFaults"> <endpoint contract="IService" binding="wsHttpBinding"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="returnFaults" > <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> 6. Now its time for us to build of service. If it is successfully built, let us browse http://localhost/WCFService/Service.svc and we expect a page, as illustrated, that notifies us the metabase publishing for this service is currently disabled.
7. To enable the metabase publishing of our service, we need to add <serviceMetadata httpGetEnabled="true" /> inside the <system.serviceModel> tag of our configuration file. It would result as <behaviors> <serviceBehaviors> <behavior name="returnFaults" > <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> 8. By browsing again our WCF service at http://localhost/WCFService/Service.svc, we will notice that it is already ready to be referenced.
At this time, as the final step, we will create our WPF Windows Application that references our WCF Service. 1. Let us open our Microsoft Visual Studio 2005. Start > All Programs > Microsoft Visual Studio 2005 > right-click Microsoft Visual Studio, then click Run as Administrator. 2. To create our WCF Service, let us click File > New > Project. 3. In the New Project dialog box, let us select Windows Application (WPF) template, and name it WPFClient. Below is the illustration. 4. Then, we will add a service reference pointed to the WCF Service we have created. Right-click our solution in the Solution Explorer, then click Add Service Reference. Write http://localhost/WCFService/Service.svc in the Service URL and name it Proxy. Below is the illustration.
9. Add Button and name it as ButtonRetrieve. 10. In our XAML file, let us add Click="ButtonClick" inside our <Button> tag. 11. Lastly, we will add this method in the xaml.cs file of our WPF application:
void ButtonClick(object sender, RoutedEventArgs e) { WPFClient.Proxy.ServiceClient service = new WPFClient.Proxy.ServiceClient(); string Message = service.Operation("Paul");
MessageBox.Show(Message); }
12. Let us build our application and we will have a WPF application that consumes a WCF service. And that's it. Hope to share you something. 10月18日 Invalid Configuration Data in IIS 7.0: A Security Stuff
Invalid Configuration Data in IIS 7.0: A Security Stuff
HTTP Error 500.19 - Internal Server Error. The request page cannot be accessed because the related configuration data for the page is invalid. Have you encountered this in hosting your Web application in Web Server (IIS 7.0) role of Windows Server 2008? Let us start with an illustration.
This is a security matter and not an issue! The Internet Information Services 7.0 lucidly communicated that it can't read the configuration file of our Web application. It is because of the following: 1. We are using Anonymous Authentication access. Below is the illustration:
2. Our Web application file is located in our user's folder - e.g. Documents > Visual Studio 2005 > Projects - where only the owner has an access. Below is the illustration.
With this, I would recommend to put our Web application files in C:\inetpub\wwwroot directory where permission is granted to USERS and/or IIS_IUSRS by default – or any directory where you can afford to grant such permission. Together with this, we could now browse our Web application hosted in IIS 7.0.
Hope to share with you something. 10月17日 Web Server in Windows Server 2008Web Server in Windows Server 2008 Internet Information Services 7.0 in Windows Server Code Name “Longhorn” revolutionizes the Web server architecture by providing us the following augmentations: 1. Windows Process Activation Services (WAS) that empowers our site to employ HTTP/HTTPS and non-HTTP protocols. 2. Modular architecture that allows us to include and exclude modules as needed. 3. Integrated platform with ASP.NET, Windows Communication Foundation, and Windows SharePoint Services. What is more, these architectural innovations assure us of utmost compatibility with our existing application – e.g. ADSI, ASP .NET applications, ISAPI extensions, et al. In this piece, I will be deliberating on Windows Process Activation Services, and Modular Architecture with ASP.NET integration. Then again, I’ve posted a brief piece on Windows SharePoint Services integration at http://elczara.spaces.live.com/blog/cns!554EC06D366AC9D5!220.entry. Windows Process Activation Services
By eradicating the dependency on HTTP, Windows Process Activation Service model simplifies the Internet Information Services architecture. It is the process activation service of IIS 7.0 to support both HTTP and non-HTTP transports, including TCP, Named Pipes, and MSMQ. What is more, it provides management services of application pool configuration and worker process in the entire IIS 7.0 request processing.
Figure 1. Windows Process Activation Services as a required feature for IIS 7.0.
In the entire request-processing-response servicing, IIS 7.0 takes benefit of several components. These include Windows Process Activation Services, World Wide Web Publishing Service (W3SVC), Listener Adapters, Protocol Listener, and Worker Process. At this instant, to appreciate the enhancement made in IIS 7.0 through WAS, we will initially give a glance on the process on IIS 6.0 in worker process isolation mode. 1. Upon receipt, the HTTP protocol stack (HTTP.sys) validates the request. If valid, the HTTP.sys verifies the requested content type. Else, it will notify the client. 2. If the requested content is static, a response will immediately be served to the client. Else, the HTTP.sys verifies the presence of response in the kernel-mode cache. 3. If the response is in the cache, HTTP.sys will immediately provide the response. Else, the same request will be placed in queue. 4. If the queue has no corresponding worker process, the HTTP.sys informs the WWW Service to initialize one. With this, the worker process processes the request. 5. The Worker Process sends the response to HTTP.sys, and the later sends it the client.
With the birth of IIS 7.0, however, the paradigm has sifted to WAS-centered architecture. Below is the tabular presentation of the process:
Modular Architecture
Internet Information Server 7.0 is a lightweight server core with several pluggable features, known as modules. Thus, they could be included into or excluded from this core as needed. A module is either a Win32 DLL or a .NET 2.0 type included within an assembly. The former is called native module while the later is called managed module. Moreover, these modules can be replaced by a custom module developed in IIS 7.0 C++ APIs, or ASP.NET 2.0 APIs.
Figure 2. Modules feature view in IIS 7.0 Manager.
With this architecture, we can take advantage of:
1. Minimized attack surface area and memory trail by adding only modules that are needed.
2. Integrated IIS and ASP.NET features that once were duplicated.
3. Availability of ASP.NET features to all request type.
With this model, ASP.NET is no longer employed with our Web server as a standalone application framework. It serves by now being a platform for extending the IIS Web server, facilitating ASP.NET components to turn into constituents of the IIS request processing pipeline. Hence, ASP.NET services can now apply to any content type including ASP pages and PHP pages.
Moreover, with the innovated configuration store of IIS 7.0, we have the leverage to examine these modules by opening the <globalModules> and <modules> elements of the configuration file located in (%windir%\System32\inetsrv\config\applicationHost.config where the former defines the server level modules or global modules, and the later delineates the enabled modules for all applications on the server.
Native Modules
Name
Description
AnonymousAuthenticationModule
Allows us to access any public content without providing a credential.
BasicAuthenticationModule
Requires us to provide a credential to access content. It transmits unencrypted base64-encoded passwords across the network.
CertificateMappingAuthenticationModule
By mapping the SSL client certificate to an Active Directory account, it facilitates usage of client certificate for authentication.
CgiModule
Lets us define how our Web server passes information to an external program.
ConfigurationValidationModule
Implements validation of configuration.
CustomErrorModule
Aside from implementing the IIS 7.0 detailed error feature, it allows us to customize the error messages returned by our Web server.
CustomLoggingModule
Provides us support to tailor logging format of Web server activity footed on our needs.
DefaultDocumentModule
Lets us configure the default file for the Web server.
DigestAuthenticationModule
Employs by submitting hashed password to the Windows domain controller.
DirectoryListingModule
Employs browsing of our Web server directory.
DynamicCompressionModule
Implements HTTP compression of dynamic content.
FailedRequestsTracingModule
Implements tracing of failed requests to diagnose our Web application.
FastCgiModule
Supports FastCGI, which offers a high-performance option to CGI.
HttpCacheModule
Takes up the IIS 7.0 output caching and the HTTP.sys caching process.
HttpLoggingModule
Affords us to log our Web site activity.
HttpRedirectionModule
Implements support to redirect user request to a defined destination.
IISCertificateMappingAuthenticationModule
By mapping the SSL client certificate to a Windows account, where credential and mapping rules are maintained within the IIS configuration store, it facilitates usage of client certificate for authentication.
IpRestrictionModule
Permits us to allow or deny request from a specific IP address and domain name.
IsapiFilterModule
Implements support for files that extend IIS functionalities, knows as ISAPI filters.
IsapiModule
Implements support for Web content using ISAPI extensions.
ProtocolSupportModule
Carries out protocol-based actions – e.g. setting response headers and redirecting headers based on configuration.
RequestFilteringModule
Employs screening of requests to our server based on defined rules.
ServerSideIncludeModule
Server Side Includes (SSI) facilitates dynamic generation of HTML pages.
StaticCompressionModule
Implements HTTP compression of static content.
StaticFileModule
Employs publication of static Web file format in our server.
UrlAuthorizationModule
Allows us to define access restriction rules to our Web content. It could be bound to users
WindowsAuthenticationModule
Works only in an intranet environment leveraging our Windows domain security implementation. Managed Modules
AnonymousIdentification
Implements configuration of anonymous identification for application authorization.
DefaultAuthentication
Makes sure the presence of an authentication object.
FileAuthorization
Employs verification of user permission to access the file requested.
FormsAuthentication
With the aid of Forms Authentication Provider, it lets us implement client registration and authentication at the application level.
OutputCache
Stores the contents of a processed ASP.NET page in memory which allows ASP.NET to send a page response without going through the page processing lifecycle.
Profile
Correlates information with a specific user and accumulates the information in a standard format.
RoleManager
Aids us to manage authorization, granting us to define user access in the resources of our application.
Session
Since HTTP is a stateless protocol, it enables us to store and retrieve values across different Web pages.
UrlAuthorization
Implements verification of user permission to access the URL requested.
UrlMappingsModule
Facilitates mapping of URL displayed to user to the URL of a page in our Web application.
WindowsAuthentication
With the aid of Windows Authentication Provider, it implements Windows authentication in conjunction with IIS authentication to secure ASP.NET applications. 10月11日 WSS 3.0’s IIS 7.0 Role Services
WSS 3.0’s IIS 7.0 Role Services
In my preceding blog on WSS 3.0 in Windows Server® Code Name “Longhorn”, we have mentioned that installing WSS 3.0 role includes installation of Web Server (Internet Information Services 7.0) role and other features - e.g. .NET Framework 3.0, Windows Internal Database, and Windows Process Activation Service. As illustrated below, this is apparent during our installation.
Internet Information Services (IIS) 7.0 is the Web Server for Windows Server 2008. Not to mention that Windows Vista has also features depending on version, it provides all the features and services needed to host web applications. As compared to IIS 6.0, the Web server has been redesigned in IIS 7.0 with new components: 1. A novel service, Windows Process Activation Service (WAS), which enables sites to use protocols other than HTTP and HTTPS. It manages application pool configuration and worker processes instead of WWW Service. Thus, we can run WAS without WWW Service if you do not need to listen for HTTP requests in HTTP.sys. 2. A Web server engine that can be customized by adding or removing web server modules. 3. Integration of request-processing pipelines from IIS and ASP.NET.
With its modular architecture, IIS 7.0 provides fundamental modules/role services for Windows SharePoint Services 3.0. It could be categorized as: 1. Web Server 1.1. Common HTTP Features 1.2. Application Development 1.3. Health and Diagnostics 1.4. Security 1.5. Performance 2. Management Tools 2.1. IIS Management Console 2.2. IIS 6.0 Management Compatibility
Below is an illustration of the requests for the worker process.
Below is an illustration of authentication feature view in IIS Manager.
Below is an illustration of compression feature view in IIS Manager.
Hoping to contribute something...Thanks...
10月4日 WSS 3.0 in Windows Server 2008 Beta 3WSS 3.0 in Windows Server 2008 Beta 3
I've been exploring Windows Server 2008 Beta 3 and WSS 3.0 to contribute in the Windows Server 2008 Insiders group of MS Philippines. With the following considerations, do you want to join me in walking through its basic installation process?
1. To start, we will open our Server Manager. Click Start, point to Administrative Tools, then click Server Manager. Below are the illustrations.
2. In the Server Manager, let us select Roles, then Add Roles. As illustrated below, we will be prompted by the Add Roles Wizard.
3. Along the wizard steps, we will select Windows SharePoint Services 3.0 as the role to be installed. NOTE: Installation of WSS 3.0 role includes installation of Web Server (IIS 7.0) role and other features - e.g. .NET Framework 3.0, Windows Internal Database, and Windows Process Activation Service. 4. As illustrated below, we are expected to have Web Server (IIS) and Windows SharePoint Services in our Roles Summary list.
5. And finally, browse http://Server Name/ and we will have our Team Site running in Windows Server 2008 Beta 3. Let me inform you once these known issues are resolved. Thanks. 9月21日 Microsoft Office Outlook 2007 Integration
Microsoft Office Outlook 2007 Integration I was once asked: “Is there an offline support for SharePoint lists and document libraries?” Yes there is! Using Microsoft Office Outlook 2007 as our offline client application. Not to mention that this walkthrough is applicable as well for other SharePoint lists/libraries, we will be focusing on the integration and synchronization of SharePoint calendar with Outlook. 1. In our Outlook My Calendar, we will create two activities. For our purpose, we will set them as: a. Outlook Activity A, September 20, 2007, 9:00 AM to 10:00 AM. b. Outlook Activity B, September 20, 2007, 1:00 PM to 3:00 PM. 2. In our SharePoint Calendar, we will create an activity. We will set it SharePoint Activity A, September 20, 2007, 11:00 AM to 1:00 PM. 3. Now we will start the integration. In our SharePoint Calendar page, click Actions, then Connect to Outlook. We will be transferred to Microsoft Office Outlook 2007 with the Connect this SharePoint Calendar to Outlook dialog box. Below is the illustration.
4. In the same dialog box, let us click Advanced. We will be prompted by the SharePoint List Options dialog box. Below is the illustration.
5. For our purpose, we will change the Folder Name to SharePoint Calendar, and leave the Update Limit being checked to update our subscription with the publisher’s recommendation. Then, click OK. 6. In our Connect this SharePoint Calendar to Outlook dialog box, click Yes. Automatically, our SharePoint Calendar will be integrated in our Outlook under Other Calendars category. Below is the illustration.
7. In our Outlook menu, let us click Tools, then Account Settings. The Account Settings dialog box will be displayed. Notice that our SharePoint Calendar is already listed in the SharePoint Lists. Below is the illustration.
8. At rest in the Tools menu, let us point to Send/Receive, then to Send/Receive Settings, then click Define Send/Receive Groups. 9. In the dialog box as before, click Edit. The Send/Receive Settings – All Accounts dialog box will be displayed. Under our SharePoint account, as illustrated below, our SharePoint Calendar is included in our Send/Receive Options check list.
10. To synchronize our SharePoint Calendar with the Calendar in our SharePoint site, let us click Tools menu, point to Send/Receive, then click Send/Receive All.
NOTE: This is not a synchronization of SharePoint Calendar with Outlook My Calendar.
11. To copy our Outlook My Calendar to SharePoint Calendar, let us select both Outlook Activity A and Outlook Activity B, the click Edit menu, then click Copy to Folder. The Copy Items dialog box will be displayed. Below is the illustrated results. 12. In the Copy Items dialog box, under SharePoint Lists, select SharePoint Calendar, then click OK. Below is the illustrated results.
NOTE: The file is located in our C:\Documents and Settings\User Name\Local Settings\Application Data\Microsoft\Outlook directory as .pst file.
NOTE: If you roam Microsoft Office Outlook 2007, the SharePoint List is synchronized into a folder under the proxy .pst.
NOTE: Any mismatched item will be detached and the original version will be potted in the Local Failures folder.
13. Lastly, let us click Tools menu, point to Send/Receive, then click Send/Receive All. Then, let us open our SharePoint site, and there we have a synchronized calendar items.
14. Yet again, we can do the same Outlook integration with our SharePoint Contacts, Document Library, and Task List. Thanks. 9月19日 SharePoint Web Part Template
SharePoint Web Part Template With Windows SharePoint Services 3.0 Web Part using Microsoft Visual Studio 2005 Extensions, several steps we manually do when using Class Library or Web Control Library are automated – it simplifies the creation, deployment, and testing of Microsoft ASP.NET Web Parts in Windows SharePoint Services. Web Parts in Microsoft Windows SharePoint Services offer us means to create user interface components that support both customization and personalization. The Windows SharePoint Services 3.0 Web Part infrastructure is designed and built on a layer over the Microsoft ASP.NET 2.0 Web Part infrastructure. With an assumption that we have already installed and configured the Visual Studio 2005 Extensions for Windows SharePoint Services 3.0, we will create a calendar web part that could be displayed in the home page of our portal with link to our Calendar list. Create Project 1. Let us open our Microsoft Visual Studio 2005. In the File menu, point to New, then click Project. 2. In the New Project dialog box, under Visual C# | SharePoint, let us select Web Part template. We will name our project WebPartTemplate. Then, click OK. Below is the illustration.
Initial Settings 1. In our Solution Explorer, right-click Web Part project, then click Properties. The Properties window will be displayed. 2. In the Properties window, as illustrated, we will select Debug. In the Start Action section, we will choose Start Browser with URL, pointing it to the SharePoint site where we will deploy our Web Part – e.g. http://Server Name:Port Number/.
3. Still in the Properties window, we will select SharePoint Solutions to customize the Web Part solution feature package. The template automatically creates XML files necessary to package our Web Part as a Windows SharePoint Services 3.0 Feature. These are: a. Solution – written into the manifest.xml file for the Feature. b. Feature – written into the feature.xml for the Feature. c. Element – written into the element.xml for the Feature. It contains the information contained in a .webpart file. Logic Description
using System; using Microsoft.SharePoint; using System.Web.UI.WebControls;
namespace WebPartTemplate private const string DefaultList = "Calendar"; Calendar calendar;
public WebPartTemplate() [Personalizable] [Personalizable] [Personalizable] protected override void CreateChildControls() public void CalendarSelectionChanged(object sender, EventArgs e) protected override void Render(HtmlTextWriter output) if (ViewToday) output.Write("</table>"); } Notice the following items: 1. We have added System.Web.UI.WebControl namespace directives for our calendar control.
2. We have defined three objects/attributes:
a. Calendar List – the name of our Calendar list in SharePoint where our calendar web part will be redirected.
b. Calendar Period – the calendar period to be displayed during the redirection. The values are enumerated through PeriodEnum.
c. View Today – an option to display the current date below our calendar web part.
3. We have instantiated a calendar web control. Additionally, we can add reference to System.Drawing to set the skin our control.
4. We have set an EventHandler, named CalendarSelectionChanged, for the SelectionChanged event of our calendar web control.
5. Lastly, we have rendered our web part.
Deployment As we have mentioned earlier, several steps that we manually do when using Class Library or Web Control Library are automated by the extensions. This is noticeable in the deployment process.
1. Let us press F5. The extensions will automatically perform a number of tasks for us – e.g. assembly building, installing to global assembly cache, adding to SafeControls list, et al.
2. In our SharePoint page, click Site Actions, then click Edit Page.
For our purpose, our SharePoint page must have a Calendar list named Calendar, where our calendar web part will be redirected. Else, we need to set the Calendar List property of our Web Part later through Modify Shared Web Part by pointing it to a specific Calendar list.
3. In a specific Web Part zone, click Add a Web Part to the Add Web Parts dialog box.
4. Select our WebPartTemplate, then Add. Lastly, click Exit Edit Mode to have our final output.
I hope this would help!
9月13日 Embedding InfoPath Form in SharePoint Page
Embedding InfoPath Form in SharePoint Page Few weeks ago, I was punctuated to embed an InfoPath form in SharePoint page. Immediately, I though of creating a custom web part or using SharePoint Designer. But hold on, InfoPath has already provided us this facility. By the good worth of “NO CODE” development model, it is the sensible solution: XML Form View web part. We initially need the following: 1. A Form Library in SharePoint site. In this paper, we will name our Form Library as Expense and our SharePoint site as Demonstration Portal. 2. A browser-enabled InfoPath form published to our Expense Form Library. We will use the Sample-Expense Report and name it as Expense Report. By the same token, we could use an administrator-approved form template, plainly uploaded and activated through Manage Form Template facility in the Application Management of our SharePoint 3.0 Central Administration. And we will get a hold of the same results. 1. Upon completion of our two predetermined items, we going to add the following line in the <SafeControls> tag of the web.config file of our web application:
<SafeControl Assembly="Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.InfoPath.Server.Controls" TypeName="*" Safe="True" />
NOTE: The web.config file of our web application is located at C:\Inetpub\wwwroot\wss\ VirtualDirectories\web application port number.
2. Let us open our Demonstration Portal. Under Site Actions, click Site Settings. 3. In the Site Settings page, as illustrated below, click Web Part Gallery link.
4. In the Web Part Gallery page, click New. We will be redirected to the Web Part Gallery : New Web Parts facility. 5. In the Web Part Gallery : New Web Parts part, check Microsoft.Office.InfoPath.Server.Controls.XmlFormView. Then, click Populate Gallery. We will be redirected again to the Web Part Gallery page where we can verify the inclusion of XmlFormView.webpart. Below is the illustration.
6. At this instant, we will employ the web part to put on view our Expense Report form. Let us open our Expense Form Library. 7. In the Site Actions, click Edit Page. As illustrated below, the page will be set to Edit Mode.
8. Click the Add a Web Part link, and the Add Web Part to Main web page dialog will be displayed. 9. Check the XmlFormView, normally under miscellaneous section, then click OK. If we will be prompted by an error message of InfoPath, we have nothing to worry. Just click Close. 10. Now, we will modify our XmlFormView web part. To do this, click Edit, then Modify Shared Web Part. 11. As illustrated below, let us set the following items, then click OK. a. Editing Status : Editing b. Xsn Location : Please refer to the notations below. NOTE: The Xsn Location varies on the publishing approach we have employed. a. If we have published our form template directly to a specific Form Library, similar with our case, we can check the location from Site Actions, then Site Settings, then Site Libraries and Lists, then Customize Form Library, then click the corresponding Form Content Type, then Advance Settings, and we will have the URL of our form template. It is http://Server Name:Port Number/Form Library Name/forms/template.xsn. b. If we have published, however, an administrator-approved form template through the Manage Form Template facility, we can check the location from Site Actions, then Site Settings, then Site Content Types, then the corresponding Form Template Name - it is normally under the Microsoft Office InfoPath section, then Advanced Settings, and we will have the URL of our form template. It is http://Server Name:Port Number/FormServerTemplates/Form Name.xsn.
12. As a final task, we will close the Expense list view, then Exit Edit Mode to have the final output.
I hope it will help you! 9月4日 Forms Authentication in MOSS 2007: IFs and WHYs - Part 4 of 4Forms Authentication in MOSS 2007: IFs and WHYs Part 4 of 4 : Forms Authentication
1. We will start by writing additional lines in the web.config file of our Demonstration Portal and SharePoint 3.0 Central Administration. 2. To add some lines in the web.config file of our Demonstration Portal, open C:\Inetpub\wwwroot\wss\VirtualDirectories\5050\web.config. 3. Write the following lines before the <system.web> node: <connectionStrings> <remove name="PointMembership" /> <add name="PointMembership" connectionString="data source=Server Name;Integrated Security=SSPI;Initial Catalog=PointMembership" /> </connectionStrings > NOTE: Notice that the Initial Catalog is the database we have created. 4. Add the following lines inside the <system.web> node of the same web.config file: <membership defaultProvider="PublishingMembershipProvider"> <providers> <remove name="PublishingMembershipProvider" /> <add name="PublishingMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="PointMembership" applicationName="/" passwordAttemptWindow="10" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5"/> </providers> </membership>
<roleManager enabled="true" defaultProvider="PublishingRoleProvider"> <providers> <remove name="PublishingRoleProvider" /> <add name="PublishingRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="PointMembership" applicationName="/" /> </providers> </roleManager>
5. Now its time for us to add some lines in the web.config file of our SharePoint 3.0 Central Administration. Let us try to open our Internet Information Services, then right-click SharePoint Central Administration v3, then click Properties. In Home Directory tab, we could now have the path of our SharePoint 3.0 Central Administration.
6. Open the web.config file of our SharePoint 3.0 Central Administration and write the following lines before the <system.web> node: <connectionStrings> <remove name="PointMembership" /> <add name="PointMembership" connectionString="data source=Server Name;Integrated Security=SSPI;Initial Catalog=PointMembership" /> </connectionStrings > 7. Add the following lines inside the <system.web> node of the same web.config file: <membership defaultProvider="PublishingMembershipProvider"> <providers> <remove name="PublishingMembershipProvider" /> <add name="PublishingMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="PointMembership" applicationName="/" passwordAttemptWindow="10" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5"/> </providers> </membership>
<roleManager enabled="true" defaultProvider=" AspNetWindowsTokenRoleProvider"> <providers> <remove name="PublishingRoleProvider" /> <add name="PublishingRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="PointMembership" applicationName="/" /> </providers> </roleManager>
Notice that the defaultProvider is AspNetWindowsTokenRoleProvider.
WHY AspNetWindowsTokenRoleProvider? It is necessary because our SharePoint 3.0 Central Administration still uses Windows Authentication for the role provider.
8. Now we are going to set the Authentication Provider of our web application. Under the Application Security of our Application Management, click Authentication Providers link. Below is the figure.
9. In our Authentication Providers page, set our Web Application to http://servername:5050, then click the Default link. It will redirect us to Edit Authentication page. Below in the Authentication Providers page illustration.
10. In the Edit Authentication page, set the following items, the click Save. Below is the illustration. a. Web Application – http://servername:5050 b. Zone – Default c. Authentication Type – Forms d. Anonymous Access – Enabled e. Membership Provider Name – PublishingMembershipProvider f. Role Manager Name – PublishingRoleProvider g. Client Integration - No
11. Lastly, we will change the Primary Site Collection Administrator for our web application which we have created in the previous steps by the user we have created in PointMembership database. Below is the illustration.
12. Now we going to do some finishing steps. Let us browse our site at http://servername:5050. We will be prompted by the Sign In page. Log as user we created through ASP .NET Web Site Administration Tool and set as a Primary Site Collection Administrator. WHY REQUIRED TO SIGN IN? WE HAVE ALREADY ENABLED THE ANONYMOUS ACCESS SETTING? What we have enabled in our previous item is the Internet Information Services anonymous access, or Web Application anonymous access in the field of SharePoint. We have not yet enabled the anonymous access for our site. 13. In the home page of our Demonstration Portal, click Enable Anonymous Access link. We will be redirected to Change Anonymous Access Settings page.
14. In the Change Anonymous Access Settings page, select Entire Web Site, then click OK. Below is the illustration.
Until now we are still logged as the Primary Site Collection Administrator. Point to Welcome Username link at the upper-right portion of our page, this click Sign Out. And we have already implemented forms authentication in our Demonstration Portal! We could now start implementing some enhancements - might be in my next post. Hope it helps.
Forms Authentication in MOSS 2007: IFs and WHYs - Part 3 of 4
Forms Authentication in MOSS 2007: IFs and WHYs Part 3 of 4 : Portal Creation
This part centers on portal creation as the last preparatory step in implementing forms authentication in Microsoft Office SharePoint Server 2007.
1. To start, let us open our SharePoint 3.0 Central Administration. In the Application Management tab, under SharePoint Web Application Management, click Create or Extend Web Application, then Create a New Web Application. Below is the illustration.
2. In the Create New Web Application page, complete the following items, then click OK. a. IIS Web Site i. Select Create a New IIS Web Site ii. Description – SharePoint-5050 iii. Port – 5050 iv. Host Header – Leave Blank v. Path - C:\Inetpub\wwwroot\wss\VirtualDirectories\5050 b. Security Configuration i. Authentication Provider – NTLM ii. Allow Anonymous – No iii. Use Secure Sockets Layer – No c. Load Balance URK i. URL - http://servername:5050 ii. Zone-Default d. Application Pool i. Select Create New Application Pool ii. Application Pool Name – SharePoint-5050 iii. Select Configurable iv. User Name – administratoraccount v. Password – password e. Reset Internet Information Services i. Select Restart IIS Manually f. Database Name and Authentication i. Database Server - servername ii. Database Name – PointContent-5050 iii. Select Windows Authentication
3. Upon creation of our new web application, as figured below, we will be prompted by an Application Created page. As instructed on the page, let us run first “iisreset /noforce” to finish the creation of our new IIS web site before firing the Create Site Collection link.
WHY “iisreset /noforce”? To avoid forcing the internet services to stop if stopping it precisely fails. 4. Click Create Site Collection link to create our Demonstration Portal. Below are the settings: a. Web Application – http://servername:5050 b. Title and Description i. Title – Demonstration Portal ii. Description – For demonstration purposes only. c. Web Site Address – http://servername:5050/ d. Template Selection – Publishing Portal e. Primary Site Collection Administrator – administratoraccount f. Quota Temple – No Quota
< If you accidentally closed the Application Created page before site creation, we could access the Create Site Collection link from the Application Management page.
5. Finally, let us browse http://servername:5050 to check our newly created portal. Below is the illustration.
End of Part 3 of 4 9月3日 Forms Authentication in MOSS 2007: IFs and WHYs - Part 2 of 4Forms Authentication in MOSS 2007: IFs and WHYs Part 2 of 4: User Creation
As we have mentioned in Part 1, this paper is divided into four parts, where the second part focuses on user creation necessary for the database we have created in Part 1.
WHY WE CREATE A USER? Upon setting the authentication type of our portal from Windows to Form, our Primary Site Administrator, which is a Windows or an Active Directory Account, will no longer be recognized. Thus, we need this user in our proceeding items to replace our Primary Site Administrator.
2. Write the following lines before the <system.web> node of the web.config of our newly created web site:
<connectionStrings>
<remove name="PointMembership" />
<add name="PointMembership" connectionString="data source=Server Name;Integrated Security=SSPI;Initial Catalog=PointMembership" />
</connectionStrings >
NOTE: Notice that the Initial Catalog is the database we have created.
3. Add the following lines inside the <system.web> node of the same web.config file:
<membership defaultProvider="PublishingMembershipProvider">
<providers>
<remove name="PublishingMembershipProvider" />
<add name="PublishingMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="PointMembership"
applicationName="/"
passwordAttemptWindow="10"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"/>
</providers>
</membership>
<roleManager enabled="true" defaultProvider="PublishingRoleProvider">
<providers>
<remove name="PublishingRoleProvider" />
<add name="PublishingRoleProvider"
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="PointMembership"
applicationName="/" />
</providers>
</roleManager>
IF OTHER MEMBERSHIP AND ROLE PROVIDER NAMES ARE USED? No setback! Only that we have to synchronize other settings in the proceeding steps with the names we have assigned for membership and role providers.
IF NO MEMBERSHIP AND ROLE MANAGER ARE CONFIGURED? Still no setback! By default, a database is created in the App_Data folder of our web site to store membership and roles information. Hence, even without configuring our membership and role settings, the default providers will automatically be captured: AspNetSqlMembershipProvider and AspNetSqlRoleProvider. But in this case, we need to synchronize other settings in the proceeding steps.
4. Save the additions we have made in the web.config file.
5. It time for us to use the ASP .NET Web Site Administration Tool to create a user. In the Website menu of our Visual Studio, click ASP .NET Configuration. Below is the illustration.
6. Upon clicking the ASP .NET Configuration, we will be prompted by the Home page of ASP .NET Web Site Administration Tool.
WHY USING ASP .NET WEB SITE ADMINISTRATION TOOL? Basically, this tool is designed to facilitate changes in the site configuration without having to manually edit the Web.config file, in this case the configuration file of the site we have created and not the portal we will be creating. In our case, however, we use it to create a user and role for the corresponding membership and role providers which we will be using later in our portal. Even the web site we have created in the previous steps has nothing to do with our portal. It is simple our way to access this tool.
NOTE: The “How do I use this tool?” link would give us a comprehensive understanding of ASP .NET Web Site Administration Tool.
7. Click Security tab, and to create a user, set the Authentication Type, click Back, and we will be redirected again to the Security page with a link to user creation page. Below is the illustration.
WHY SETTING THE AUTHENTICATION TYPE? The authentication type we have just set is configured for the web site we have created and has nothing to do with the portal we will be creating. We have only set it to access the Create User link, which is the very purpose of using this tool.
8. Click the Create User link, complete necessary information, then click Create User. With that, we have already created a user which will serve as the Primary Site Administrator in our later steps.
Forms Authentication in MOSS 2007: IFs and WHYs - Part 1 of 4
Forms Authentication in MOSS 2007: IFs and WHYs Part 1 of 4. Database Creation
Since the beta days of MOSS 2007, we are bombarded by articles and blogs on forms authentication. I’ve enjoyed an ample benefit form those writings when I’ve implemented this model into operation few quarters ago. It was successfully employed! However, not to censure the gift of copy-paste, I ended up without understanding the IFs and WHYs of the process. The reason why I have revisited this item! In addition, I am writing this piece for those who are recently evangelized on the bizarre features of Microsoft Office SharePoint Server 2007.
Forms authentication could be implemented in four segments, where the first three are only preparatory strides. Moreover, we will devide this paper into four parts since it could not be accommodated in a single publication.
1. Database Creation
2. User Creation
3. Portal Creation
4. Forms Authentication
1. We will start by exploring C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 and execute aspnet_regsql.exe. As shown below, we will be prompted by an ASP .NET SQL Server Setup Wizard. Then, click Next.
WHY ASP .NET SQL DATABASE? It is designed to store information for ASP .NET applications services, e.g. membership, role management, profile, et al. Without writing any line of SQL script, we are automatically provided of necessary tables, views, and stored procedures. And we the same stuff, we are immediately empowered to utilize all the features of ASP .NET Web Site Administration Tool and Login controls – e.g. Login, Login View, Password Recovery, Login Status, Login Name, User Creation Wizard, and Change Password. 2. Upon clicking the Next button of the Welcome window of the wizard, we will be prompted by a window where we are going to select the setup option. Since we are going to create a new database, we need to select the Configure SQL Server for Application Services option, then click Next. Below is the illustration.
3. Below is the next window of the wizard where we are going to define the server and database we will be using. For the purpose of this piece, we will be naming our database as PointMembership. Then, click Next and Finish to finalize the our first preparatory step.
IF <default> DATABASE IS USED? No predicament! Only that the initial catalog of our connection string in the proceeding item must be pointed to aspnetdb.
End of Part 1 of 4 8月28日 Document Content TypeContent Type is one of the elements of Content Management feature of Microsoft Office SharePoint Server 2007. It helps defining various types of documents (e.g. Equity Report, Newsletter, Financial Report, et al). Moreover, it is a collection of settings that embodies the characteristics for a specific type of content. A content type has the following building blocks: o Document Template for Document Content Type o Workflow Settings o Document Information Panel Settings o Information Management Policy Settings o Columns or Metadata
In this piece of “How To” writing, I will only focus on Document Template for Document Content Type, and we are three steps away from it.
1. Document Template Preparation 2. Content Type Creation 3. Document Library Configuration
Step 1: Document Template Preparation 1. Open and save a Microsoft Office Word 2007 installed template. In this writing I will use the Equity Report template.
Step 2: Content Type Creation 1. In your parent site, click Site Actions > Site Setting. 2. Under Galleries, click Site Content Type. You will be redirected to Site Content Type Gallery page. 3. In the Site Content Type Gallery, click Create. You will be redirected to New Site Content Type page. 4. Follow the following settings: a. Name: Equity Report b. Description: For demonstration purposes only. c. Parent Content Type i. Select Parent Content Type From: Document Content Types ii. Parent Content Type: Document d. Put this Site Content Type Into: Custom Content Types 5. Click OK. You will be redirected to the Site Content Type : Equity Report page. 6. Under Settings, click Advanced Setting. It will redirect you to Site Content Type Advances Setting: Equity Report page. 7. In the Document Template section, select the Upload a New Document Template option and browse the Equity Report you have prepared in Step 1. In the Read Only section, select No. And in the Update Sites and Lists select Yes. Then, click OK. 8. Moreover, in the Site Content Type: Equity Report page, you could also configure the Workflow Settings, Document Information Panel Settings, and Information Management Policy Settings, and Document Columns (metadata).
Step 3: Document Library Configuration 1. In your Document Library, click Settings > Document Library Settings. You will be redirected to the Customize Document Library page. 2. Under General Settings, click Advanced Settings. A Document Library Advanced Settings page will be displayed. 3. In the Content Types section, select Yes to allow management of content types. Then, click OK. You will be brought back to the Customize Document Library page. Notice that in the Content Types section, an Add from Existing Site Content Types link button is already available. 4. Click Add from Existing Site Content Types. Add Content Types page will be displayed. 5. Select the Equity Report from the Available Site Content Types list, then click Add. 6. Finally, click OK.
At this instant, Equity Report is already included in the drop-down menu of New button in your document library. 8月7日 Microsoft Office SharePoint Server 2007 and Office Groove 2007 IntegrationThe Microsoft Office SharePoint Server 2007 system goes far beyond from mere content creation by managing the entire document creation and collaboration process. Moreover, as a collaboration software program, Microsoft Office Groove 2007, could be integrated with Microsoft Office SharePoint Server 2007 to enhance teams work together dynamically and effectively. Step 1: Create an Office Groove 2007 account: Step 2: Create an Office Groove 2007 workspace: Step 3: Integrate Office Groove 2007 workspace with MOSS 2007 Document Library: Step 4: Manipulating a shared document: Next Steps: 8月2日 Create and Publish KPIs Using Data in SharePoint ListsStep 1: Create KPI List Step 2: Add KPI to KPI List Step 3: Publish KPI List Create a Workflow with Microsoft Office SharePoint Designer 2007Microsoft Office SharePoint Designer 2007 makes it straighforward to integrate business workflow/logic through Workflow Designer. The basic steps of creating a workflow are always the same: First you define the workflow, and then you create the rules by choosing conditions and actions. Before you create a workflow, consider the following: Step 1: Opening a SharePoint Site Step 2: Opening a Workflow Designer Step 3: Defining the Workflow |
|
|