Author: bendewey
Date: Tue Jul  7 02:34:46 2009
New Revision: 791677

URL: http://svn.apache.org/viewvc?rev=791677&view=rev
Log:
I wrote this script to create the url reservations for the WCF services.  This 
keeps users from having to constantly run the RunServices.bat file under 
elevated privileges (Run as Admin).  I'll add this to the wiki as well.

Added:
    
incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat

Added: 
incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat
URL: 
http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat?rev=791677&view=auto
==============================================================================
--- 
incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat
 (added)
+++ 
incubator/stonehenge/trunk/stocktrader/dotnet/setup_utilities/Util/AuthorizeWcfServices.bat
 Tue Jul  7 02:34:46 2009
@@ -0,0 +1,56 @@
+...@rem 
+...@rem  Licensed to the Apache Software Foundation (ASF) under one or more
+...@rem  contributor license agreements.  See the NOTICE file distributed with
+...@rem  this work for additional information regarding copyright ownership.
+...@rem  The ASF licenses this file to You under the Apache License, Version 
2.0
+...@rem  (the "License"); you may not use this file except in compliance with
+...@rem  the License.  You may obtain a copy of the License at
+...@rem  
+...@rem        http://www.apache.org/licenses/LICENSE-2.0
+...@rem  
+...@rem   Unless required by applicable law or agreed to in writing, software
+...@rem   distributed under the License is distributed on an "AS IS" BASIS,
+...@rem   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+...@rem   See the License for the specific language governing permissions and
+...@rem   limitations under the License.
+...@rem 
+
+...@echo off
+
+SET user=%USERDOMAIN%\%USERNAME%
+
+...@echo.
+...@echo This script adds an Authorized URL reservation for the .NET Service
+...@echo endpoints.  This alleviates the need to execute the RunServices.bat 
file
+...@echo under elevated priviledges (Run as Administrator).
+...@echo.
+...@echo Please note, this script does have to be (Run as Administrator)
+...@echo.
+...@echo 
========================================================================
+...@echo                                 Menu    
+...@echo 
------------------------------------------------------------------------
+...@echo     1 = Set Reservation for %USERDOMAIN%\%USERNAME%
+...@echo     2 = Set Reservation for \Everyone   
+...@echo     3 = Delete Reservation
+...@echo     Q = Cancel
+...@echo.
+
+
+choice /c:123Q /n
+if errorlevel 2 SET user=\Everyone
+if errorlevel 3 GOTO Remove
+if errorlevel 4 GOTO:EOF
+
+netsh http add urlacl url=http://+:7000/ user=%user%
+netsh http add urlacl url=http://+:8000/ user=%user%
+netsh http add urlacl url=http://+:9000/ user=%user%
+GOTO Exit
+
+:Remove
+netsh http delete urlacl url=http://+:7000/
+netsh http delete urlacl url=http://+:8000/
+netsh http delete urlacl url=http://+:9000/
+GOTO Exit
+
+:Exit
+pause
\ No newline at end of file


Reply via email to