mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-15 17:10:51 -10:00
Compare commits
319
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f42420784a | ||
|
|
197645cab3 | ||
|
|
b36eb0de89 | ||
|
|
149a844478 | ||
|
|
1f2c8fb449 | ||
|
|
faf8187a89 | ||
|
|
19278d187a | ||
|
|
17a827d08c | ||
|
|
a408043594 | ||
|
|
d567e15089 | ||
|
|
4b6aa76c2b | ||
|
|
043401d353 | ||
|
|
9d6315a87f | ||
|
|
ab383f7658 | ||
|
|
aea10b3386 | ||
|
|
25329653b9 | ||
|
|
5f97d76229 | ||
|
|
699a63f9bf | ||
|
|
766153c15d | ||
|
|
febc509ab9 | ||
|
|
d38c887328 | ||
|
|
0800486b6d | ||
|
|
7d2fc45070 | ||
|
|
1025cb852b | ||
|
|
abb1427039 | ||
|
|
7c92aebbec | ||
|
|
767e1b4a83 | ||
|
|
61372e1283 | ||
|
|
ef4b263b8e | ||
|
|
00a5ce9362 | ||
|
|
dce7214228 | ||
|
|
532820651d | ||
|
|
597dad255c | ||
|
|
eab950e955 | ||
|
|
bd983aed5a | ||
|
|
9c69dbaeb2 | ||
|
|
d06fd24062 | ||
|
|
a98a751d23 | ||
|
|
777f61d1fe | ||
|
|
f77bbba68c | ||
|
|
f152fde507 | ||
|
|
804f059189 | ||
|
|
edc762986f | ||
|
|
b5eb38be7a | ||
|
|
8059415416 | ||
|
|
10967e4276 | ||
|
|
5114bdc17e | ||
|
|
1115e1bdb7 | ||
|
|
4cb70c0114 | ||
|
|
36d3a24bac | ||
|
|
a580b027f0 | ||
|
|
9ee06a4e7b | ||
|
|
ec2614a0c0 | ||
|
|
58d7c76937 | ||
|
|
a27b9b7616 | ||
|
|
8f1f7fa935 | ||
|
|
f652accb19 | ||
|
|
04eb667e1b | ||
|
|
c0c7e755cd | ||
|
|
6745aefb04 | ||
|
|
053e71392f | ||
|
|
4dc622c3e3 | ||
|
|
225b0d6a42 | ||
|
|
285bc6027f | ||
|
|
04f446f887 | ||
|
|
a40a2996ac | ||
|
|
848b95d5ee | ||
|
|
f8474c4350 | ||
|
|
d29212628e | ||
|
|
8e0a3f2b9d | ||
|
|
35b63892f6 | ||
|
|
3600f6c99a | ||
|
|
0b3658594d | ||
|
|
2b68c67254 | ||
|
|
3cd9bafe5b | ||
|
|
eb307e9c56 | ||
|
|
d9b657c187 | ||
|
|
64f303b629 | ||
|
|
77dc1371ed | ||
|
|
05d3baf3ac | ||
|
|
e6a85f0e37 | ||
|
|
bd8f4c9322 | ||
|
|
7770133d8b | ||
|
|
5b47a3181a | ||
|
|
089c47f1c0 | ||
|
|
ef8ee28490 | ||
|
|
3c7a0203ee | ||
|
|
3f5bd28dbc | ||
|
|
4a7437e006 | ||
|
|
a7ab399d09 | ||
|
|
5feb19a2af | ||
|
|
9a8067719c | ||
|
|
76e0f64862 | ||
|
|
a26371d320 | ||
|
|
7ba6a80cf2 | ||
|
|
5bf53f02df | ||
|
|
8c1ffe78cc | ||
|
|
6b50adcad2 | ||
|
|
618c040e4f | ||
|
|
96e2977281 | ||
|
|
8f159df5f5 | ||
|
|
3eb84b0b77 | ||
|
|
e7c6678b27 | ||
|
|
7613767496 | ||
|
|
135ea40d49 | ||
|
|
5300a4c305 | ||
|
|
c8da3a8c2a | ||
|
|
7452477db3 | ||
|
|
3a985d6538 | ||
|
|
121e7d9298 | ||
|
|
9331ebc256 | ||
|
|
82863f05bf | ||
|
|
9d61150526 | ||
|
|
5ff8055fa8 | ||
|
|
af811230fc | ||
|
|
dd9d66a7c2 | ||
|
|
d8eb381e0f | ||
|
|
905088bb90 | ||
|
|
e69e878405 | ||
|
|
c871ff63ff | ||
|
|
08e3a4120c | ||
|
|
acf6c4bd37 | ||
|
|
e734cd8b59 | ||
|
|
ef974eba6a | ||
|
|
2e2e56cb39 | ||
|
|
ba2e5e42f3 | ||
|
|
d47dfa8b51 | ||
|
|
dd8adb39c3 | ||
|
|
ddf47829d9 | ||
|
|
db51ade40a | ||
|
|
7fb11e54c7 | ||
|
|
8681a9efc5 | ||
|
|
f7b1a38f7d | ||
|
|
96e0145891 | ||
|
|
61f5d4c10a | ||
|
|
939377b20a | ||
|
|
7a53204f66 | ||
|
|
d642444ee6 | ||
|
|
1eb169d3f6 | ||
|
|
959c6de742 | ||
|
|
61edf782f9 | ||
|
|
125c0e99e1 | ||
|
|
ef7f3975c5 | ||
|
|
7055704ed9 | ||
|
|
c8e9b18fc7 | ||
|
|
67986bd306 | ||
|
|
625e60e0b4 | ||
|
|
6d5c1dd966 | ||
|
|
18ef7d9a0b | ||
|
|
619f48b58b | ||
|
|
65afb9f640 | ||
|
|
5b8bdc44b6 | ||
|
|
2f39e259f3 | ||
|
|
35043d00e4 | ||
|
|
f4d981cf03 | ||
|
|
fcdc920ddc | ||
|
|
78ca023824 | ||
|
|
2026a0b408 | ||
|
|
ed2eeebef1 | ||
|
|
17fda960fe | ||
|
|
b473fbf965 | ||
|
|
9f44a62acf | ||
|
|
19f5183be3 | ||
|
|
7f965e8220 | ||
|
|
e34fe7182c | ||
|
|
21cd9994e7 | ||
|
|
d220cbd99b | ||
|
|
8c6f3ca593 | ||
|
|
664c608478 | ||
|
|
ba95f00ec5 | ||
|
|
3cde89c4da | ||
|
|
5905ff2618 | ||
|
|
90e2692d69 | ||
|
|
1fb554d7ed | ||
|
|
a02ad3af61 | ||
|
|
8205e22ba8 | ||
|
|
198028586b | ||
|
|
024241f424 | ||
|
|
d979cff046 | ||
|
|
f1cfd85041 | ||
|
|
f774f96e05 | ||
|
|
c4a03267f4 | ||
|
|
f48bb4bfb5 | ||
|
|
b564c16226 | ||
|
|
9b0491d2b3 | ||
|
|
b5a3a169df | ||
|
|
c0a692eb5c | ||
|
|
fbb984af9b | ||
|
|
bf3cd4557d | ||
|
|
f0298e5a2c | ||
|
|
6f89034001 | ||
|
|
82822106d8 | ||
|
|
2612ccb64d | ||
|
|
40dffe542e | ||
|
|
bf6cd183cc | ||
|
|
b248963021 | ||
|
|
2b81318351 | ||
|
|
730b4c7fde | ||
|
|
162dd58515 | ||
|
|
44b9eff431 | ||
|
|
01603cf37b | ||
|
|
627772db1c | ||
|
|
736c747fdf | ||
|
|
7a150f7c84 | ||
|
|
a900ef987b | ||
|
|
cc10f1a009 | ||
|
|
9dd8285992 | ||
|
|
0df254ddae | ||
|
|
272336b6a3 | ||
|
|
20d7b6a558 | ||
|
|
02f59bac0c | ||
|
|
b11dfd2aff | ||
|
|
f379b7df51 | ||
|
|
3e9f79184b | ||
|
|
84c32c0c67 | ||
|
|
eb89783365 | ||
|
|
b25f5d16ce | ||
|
|
053f1415ba | ||
|
|
fd213a6d19 | ||
|
|
6e927b4ce3 | ||
|
|
77fa9812f0 | ||
|
|
db654d24db | ||
|
|
db847470a0 | ||
|
|
1f3421e78d | ||
|
|
04ac046007 | ||
|
|
98f0a7b39a | ||
|
|
6723b79e3c | ||
|
|
03f2ff096a | ||
|
|
6e819dea67 | ||
|
|
cec0f68cb8 | ||
|
|
b6a4dad872 | ||
|
|
373031252e | ||
|
|
5defe6f35c | ||
|
|
ef9543e288 | ||
|
|
5260e942a3 | ||
|
|
8d19114895 | ||
|
|
dc60579386 | ||
|
|
dc89b23ded | ||
|
|
dc3a252a52 | ||
|
|
0fce7d666b | ||
|
|
0884bca59e | ||
|
|
a201572042 | ||
|
|
fad223adb8 | ||
|
|
382dd87b48 | ||
|
|
b700aeb026 | ||
|
|
3aa52dca53 | ||
|
|
f9eae9f4bc | ||
|
|
50343d3d2e | ||
|
|
2d707b5dc1 | ||
|
|
216b11bd8d | ||
|
|
091f2cade1 | ||
|
|
edf70859d7 | ||
|
|
35a840a78c | ||
|
|
2a3ec28bff | ||
|
|
f87e37159d | ||
|
|
822ee730f3 | ||
|
|
1585459e2e | ||
|
|
89baf6d449 | ||
|
|
37bae7f34a | ||
|
|
47cc449895 | ||
|
|
ae0dad98ae | ||
|
|
87e93a0d58 | ||
|
|
b44b21ccf9 | ||
|
|
a727206659 | ||
|
|
c90e3b760f | ||
|
|
19ef659344 | ||
|
|
2ea7decb7b | ||
|
|
08198a547b | ||
|
|
76078f9670 | ||
|
|
bf134e25ff | ||
|
|
af3310bbd3 | ||
|
|
ccbe5f6a68 | ||
|
|
ad8807f137 | ||
|
|
d80a218532 | ||
|
|
adef97107b | ||
|
|
6ed62014fd | ||
|
|
79e6db69e0 | ||
|
|
80efb7ab7a | ||
|
|
3e2a9e30af | ||
|
|
d1d6b05324 | ||
|
|
292ee11f1f | ||
|
|
027c82b32c | ||
|
|
a356639122 | ||
|
|
f06366e31d | ||
|
|
18668a1fa4 | ||
|
|
c3145582fc | ||
|
|
ec5ef1e9c2 | ||
|
|
14f32d68f1 | ||
|
|
1cd2c3fa5a | ||
|
|
20482680ae | ||
|
|
09c26bf8c7 | ||
|
|
ebc5130e31 | ||
|
|
ed3e121299 | ||
|
|
46f7140123 | ||
|
|
a49236e879 | ||
|
|
e4426cbcdb | ||
|
|
59b84d7a76 | ||
|
|
572ab4dcbb | ||
|
|
bd5b3ca14b | ||
|
|
74de7595ac | ||
|
|
bd4c8b9074 | ||
|
|
9186521479 | ||
|
|
fded4957dd | ||
|
|
e0b65ae93d | ||
|
|
f85fd107c7 | ||
|
|
61c088a932 | ||
|
|
37ad1431c9 | ||
|
|
88fce13184 | ||
|
|
4e0ae8c578 | ||
|
|
5499b3ecc6 | ||
|
|
6f92ae31be | ||
|
|
92a593c17d | ||
|
|
8bb9bb703b | ||
|
|
39389be976 | ||
|
|
6f50c368f1 | ||
|
|
9d96fb5a76 | ||
|
|
1a77ad3fa7 | ||
|
|
1ba53e055a | ||
|
|
83e015740a |
No files matched your search
+1
-1
@@ -23,7 +23,7 @@
|
||||
[submodule "external/referencesource"]
|
||||
path = external/referencesource
|
||||
url = git://github.com/mono/referencesource
|
||||
branch = mono
|
||||
branch = mono-4.4.0-branch
|
||||
[submodule "external/reference-assemblies"]
|
||||
path = external/binary-reference-assemblies
|
||||
url = git://github.com/mono/reference-assemblies.git
|
||||
|
||||
+37
-19
@@ -1,7 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT(mono, [4.3.2],
|
||||
AC_INIT(mono, [4.4.0],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -2598,21 +2598,54 @@ if test "x$enable_llvm" = "xyes"; then
|
||||
|
||||
if test "x$host_win32" = "xno"; then
|
||||
|
||||
# Should be something like '2.6' or '2.7svn'
|
||||
llvm_version=`$LLVM_CONFIG --version`
|
||||
llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>/dev/null`
|
||||
AC_MSG_CHECKING(LLVM version)
|
||||
AC_MSG_RESULT($llvm_version $llvm_api_version)
|
||||
if echo $llvm_version | grep -q 'mono'; then
|
||||
if test "x$enable_llvm_version_check" == "xyes"; then
|
||||
if test "$llvm_version" != "$expected_llvm_version"; then
|
||||
AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
|
||||
fi
|
||||
|
||||
# The output of --cflags seems to include optimizations flags too
|
||||
LLVM_CFLAGS=`$LLVM_CONFIG --cflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
|
||||
LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
|
||||
if test $llvm_api_version -gt 100; then
|
||||
# The --cflags argument includes all kinds of warnings -pendantic etc.
|
||||
LLVM_CFLAGS="-I$with_llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
|
||||
LLVM_CXXFLAGS="-I$with_llvm/include -std=c++11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
|
||||
else
|
||||
LLVM_CFLAGS=`$LLVM_CONFIG --cflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
|
||||
LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
|
||||
fi
|
||||
# LLVM is compiled with -fno-rtti, so we need this too, since our classes inherit
|
||||
# from LLVM classes.
|
||||
LLVM_CXXFLAGS="$LLVM_CXXFLAGS -fno-rtti -fexceptions"
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
# This might include empty lines
|
||||
LLVM_SYSTEM_LIBS=`$LLVM_CONFIG --system-libs 2>/dev/null | grep -- -`
|
||||
if test "x$host" != "x$target"; then
|
||||
llvm_jit_supported=yes
|
||||
if test $llvm_api_version -gt 100; then
|
||||
# Based on llvm 3.9, only aot is currently supported
|
||||
llvm_jit_supported=no
|
||||
elif test "x$host" != "x$target"; then
|
||||
# No need for jit libs
|
||||
llvm_jit_supported=no
|
||||
fi
|
||||
if test $llvm_jit_supported = no; then
|
||||
# No need for jit libs
|
||||
LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter`
|
||||
else
|
||||
LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter jit mcjit $llvm_codegen`
|
||||
fi
|
||||
if test "x$LLVM_LIBS" == "x"; then
|
||||
echo "$LLVM_CONFIG --libs failed."
|
||||
exit 1
|
||||
fi
|
||||
LLVM_LIBS="$LLVM_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS"
|
||||
# The c++ standard library used by llvm doesn't show up in $LLVM_SYSTEM_LIBS so add it manually
|
||||
if echo $LLVM_CXXFLAGS | grep -q -- '-stdlib=libc++'; then
|
||||
@@ -2623,21 +2656,6 @@ if test "x$enable_llvm" = "xyes"; then
|
||||
|
||||
expected_llvm_version="3.4svn-mono-mono/e656cac"
|
||||
|
||||
# Should be something like '2.6' or '2.7svn'
|
||||
llvm_version=`$LLVM_CONFIG --version`
|
||||
llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>/dev/null`
|
||||
AC_MSG_CHECKING(LLVM version)
|
||||
AC_MSG_RESULT($llvm_version)
|
||||
if echo $llvm_version | grep -q 'mono'; then
|
||||
if test "x$enable_llvm_version_check" == "xyes"; then
|
||||
if test "$llvm_version" != "$expected_llvm_version"; then
|
||||
AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
|
||||
fi
|
||||
|
||||
else
|
||||
LLVM_CFLAGS="-I$with_llvm/include -DNDEBUG -D__NO_CTYPE_INLINE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
|
||||
LLVM_CXXFLAGS="$LLVM_CFLAGS -std=gnu++11 -fvisibility-inlines-hidden -fno-rtti -Woverloaded-virtual -Wcast-qual"
|
||||
|
||||
@@ -750,6 +750,8 @@ mono_thread_current
|
||||
mono_thread_detach
|
||||
mono_thread_exit
|
||||
mono_thread_get_main
|
||||
mono_thread_get_managed_id
|
||||
mono_thread_get_name_utf8
|
||||
mono_thread_get_undeniable_exception
|
||||
mono_thread_hazardous_free_or_queue
|
||||
mono_thread_hazardous_try_free_all
|
||||
|
||||
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: f4f5f2f4cd...fcb3074202.
Vendored
+1
-1
Submodule external/referencesource updated: e12162bb0f...e833dc4ab2.
-436
@@ -1,436 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <[email protected]>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
|
||||
base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
tmpdepfile1="$base.o.d"
|
||||
tmpdepfile2="$base.d"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*) # this is libtool, let us make it quiet
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case "$arg" in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
# X makedepend
|
||||
(
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in no)
|
||||
set ""; shift
|
||||
cleared=yes
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
( IFS=" "
|
||||
case " $* " in
|
||||
*" --mode=compile "*)
|
||||
for arg
|
||||
do # cycle over the arguments
|
||||
case $arg in
|
||||
"--mode=compile")
|
||||
# insert --quiet before "--mode=compile"
|
||||
set fnord "$@" --quiet
|
||||
shift # fnord
|
||||
;;
|
||||
esac
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # "$arg"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
) &
|
||||
proc=$!
|
||||
"$@"
|
||||
stat=$?
|
||||
wait "$proc"
|
||||
if test "$stat" != 0; then exit $stat; fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
-336
@@ -1,336 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <[email protected]>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar ${1+"$@"} && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar ${1+"$@"} && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" ${1+"$@"} && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
+8
-1
@@ -142,6 +142,11 @@ instead of going through the operating system symbol lookup operation.
|
||||
.I llvm-path=<PREFIX>
|
||||
Same for the llvm tools 'opt' and 'llc'.
|
||||
.TP
|
||||
.I gen-seq-points-file=FILE.msym
|
||||
Instructs the AOT compiler to generate offline sequence points .msym files.
|
||||
The path is optional, if none is passed then a .msym file will be generated
|
||||
next to the input assembly.
|
||||
.TP
|
||||
.I mtriple=<TRIPLE>
|
||||
Use the GNU style target triple <TRIPLE> to determine some code generation options, i.e.
|
||||
--mtriple=armv7-linux-gnueabi will generate code that targets ARMv7. This is currently
|
||||
@@ -889,7 +894,9 @@ environment variable to limit the extent of the messages you get:
|
||||
If set, the log mask is changed to the set value. Possible values are
|
||||
"asm" (assembly loader), "type", "dll" (native library loader), "gc"
|
||||
(garbage collector), "cfg" (config file loader), "aot" (precompiler),
|
||||
"security" (e.g. Moonlight CoreCLR support) and "all".
|
||||
"security" (e.g. Moonlight CoreCLR support), "threadpool" (thread pool generic),
|
||||
"io-threadpool" (thread pool I/O), "io-layer" (I/O layer - sockets, handles, shared memory etc)
|
||||
and "all".
|
||||
The default value is "all". Changing the mask value allows you to display only
|
||||
messages for a certain component. You can use multiple masks by comma
|
||||
separating them. For example to see config file messages and assembly loader
|
||||
|
||||
@@ -44,17 +44,21 @@ static class Consts
|
||||
public const string FxVersion = "2.0.5.0";
|
||||
public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
|
||||
public const string FxFileVersion = "4.0.50524.0";
|
||||
public const string EnvironmentVersion = FxFileVersion;
|
||||
|
||||
public const string VsFileVersion = "9.0.50727.42"; // unused, but needed for compilation
|
||||
#elif NET_4_6
|
||||
public const string FxVersion = "4.0.0.0";
|
||||
public const string FxFileVersion = "4.6.57.0";
|
||||
|
||||
public const string EnvironmentVersion = "4.0.30319.42000";
|
||||
|
||||
public const string VsVersion = "0.0.0.0"; // Useless ?
|
||||
public const string VsFileVersion = "11.0.0.0"; // TODO:
|
||||
#elif NET_4_5
|
||||
public const string FxVersion = "4.0.0.0";
|
||||
public const string FxFileVersion = "4.0.30319.17020";
|
||||
|
||||
public const string EnvironmentVersion = FxFileVersion;
|
||||
|
||||
public const string VsVersion = "0.0.0.0"; // Useless ?
|
||||
public const string VsFileVersion = "11.0.0.0"; // TODO:
|
||||
#elif NET_4_0
|
||||
|
||||
@@ -141,7 +141,7 @@ csproj-local: csproj-library csproj-test
|
||||
intermediate_clean=$(subst /,-,$(intermediate))
|
||||
csproj-library:
|
||||
config_file=`basename $(LIBRARY) .dll`-$(intermediate_clean)$(PROFILE).input; \
|
||||
[[ $(thisdir) == *"Facades"* ]] && config_file=Facades_$$config_file; \
|
||||
case "$(thisdir)" in *"Facades"*) config_file=Facades_$$config_file;; esac; \
|
||||
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
|
||||
(echo $(is_boot); \
|
||||
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
|
||||
|
||||
@@ -27,6 +27,7 @@ PROFILE_MCS_FLAGS = \
|
||||
-d:MONOTOUCH \
|
||||
-d:DISABLE_REMOTING \
|
||||
-d:DISABLE_COM \
|
||||
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
|
||||
@@ -23,6 +23,8 @@ PROFILE_MCS_FLAGS = \
|
||||
-d:MOBILE \
|
||||
-d:MOBILE_DYNAMIC \
|
||||
-d:XAMMAC \
|
||||
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
|
||||
-d:XAMARIN_MODERN \
|
||||
-nowarn:1699 \
|
||||
-nostdlib \
|
||||
-lib:$(topdir)/class/lib/$(PROFILE) \
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
include $(topdir)/build/profiles/net_4_x.make
|
||||
PROFILE_MCS_FLAGS += -d:NO_SYSTEM_DRAWING_DEPENDENCY -d:NO_WINFORMS_DEPENDENCY -d:NO_SYSTEM_WEB_DEPENDENCY -d:XAMMAC_4_5
|
||||
PROFILE_MCS_FLAGS += \
|
||||
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
|
||||
-d:NO_SYSTEM_DRAWING_DEPENDENCY \
|
||||
-d:NO_WINFORMS_DEPENDENCY \
|
||||
-d:NO_SYSTEM_WEB_DEPENDENCY \
|
||||
-d:XAMMAC_4_5 \
|
||||
-d:XAMARIN_MODERN
|
||||
XAMMAC_4_5=1
|
||||
NO_WINDOWS_BASE=1
|
||||
NO_SYSTEM_WEB_DEPENDENCY=1
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/makefile.build -crlf
|
||||
@@ -1,3 +0,0 @@
|
||||
/Web.config -crlf
|
||||
/Web.config.bak -crlf
|
||||
/makefile.build -crlf
|
||||
@@ -1 +0,0 @@
|
||||
/GlobalResource.resx -crlf
|
||||
-127
@@ -1,127 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="SearchMessage" xml:space="preserve">
|
||||
<value>Wildcard characters * and ? are permitted.</value>
|
||||
</data>
|
||||
<data name="WelcomeMessage" xml:space="preserve">
|
||||
<value>Welcome to the Web Site Administration Tool
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,7 +0,0 @@
|
||||
/CreateRole.aspx.resx -crlf
|
||||
/CreateUser.aspx.resx -crlf
|
||||
/Default.aspx.resx -crlf
|
||||
/EditUser.aspx.resx -crlf
|
||||
/ManageRole.aspx.resx -crlf
|
||||
/ManageUser.aspx.resx -crlf
|
||||
/Util.Master.resx -crlf
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="CreateRoleText" xml:space="preserve">
|
||||
<value>You can optionally add roles, or groups, that enable you to allow or deny groups of users access to specific folders in your Web site. For example, you might create roles such as "managers," "sales," or "members," each with different access to specific folders. </value>
|
||||
</data>
|
||||
<data name="newrolelabel" xml:space="preserve">
|
||||
<value>Create New Role</value>
|
||||
</data>
|
||||
<data name="rolenamelabel" xml:space="preserve">
|
||||
<value>New role name: </value>
|
||||
</data>
|
||||
</root>
|
||||
-126
@@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ActiveUserLabel" xml:space="preserve">
|
||||
<value>Active User</value>
|
||||
</data>
|
||||
<data name="CreateUserText" xml:space="preserve">
|
||||
<value>Add a user by entering a user name, password, and e-mail address on this page.</value>
|
||||
</data>
|
||||
</root>
|
||||
-123
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="EnterText" xml:space="preserve">
|
||||
<value>You can use the Web Site Administration Tool to manage all the security settings for your application. You can set up users and passwords (authentication), create roles (groups of users), and create permissions (rules for controlling access to parts of your application).</value>
|
||||
</data>
|
||||
</root>
|
||||
-135
@@ -1,135 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="editUserText" xml:space="preserve">
|
||||
<value>Use this page to edit user information and to specify what roles a user belongs in. </value>
|
||||
</data>
|
||||
<data name="Rolelbl" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="Successlbl" xml:space="preserve">
|
||||
<value>You have successfully updated the user</value>
|
||||
</data>
|
||||
<data name="successUpdatelbl" xml:space="preserve">
|
||||
<value>You have successfully updated the user </value>
|
||||
</data>
|
||||
<data name="Userlbl" xml:space="preserve">
|
||||
<value>User</value>
|
||||
</data>
|
||||
</root>
|
||||
-132
@@ -1,132 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="menageRoleText" xml:space="preserve">
|
||||
<value>Use this page to manage the members in the specified role. To add a user to the role, search for the user name and then select the User Is In Role check box for that user. </value>
|
||||
</data>
|
||||
<data name="roleNameLabel" xml:space="preserve">
|
||||
<value>Role:</value>
|
||||
</data>
|
||||
<data name="searchBylbl" xml:space="preserve">
|
||||
<value>Search by :</value>
|
||||
</data>
|
||||
<data name="searchUserlbl" xml:space="preserve">
|
||||
<value>Search for Users</value>
|
||||
</data>
|
||||
</root>
|
||||
-133
@@ -1,133 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="manageUserText" xml:space="preserve">
|
||||
<value>Click Edit User to view or change the user's password or other properties. To assign roles to the selected user, select the appropriate check boxes on the right. To prevent users from logging in to your application while retaining their information in your database, set the status to inactive by clearing the check box.
|
||||
</value>
|
||||
</data>
|
||||
<data name="roleslbl" xml:space="preserve">
|
||||
<value>Roles</value>
|
||||
</data>
|
||||
<data name="searchBylbl" xml:space="preserve">
|
||||
<value>Search by :</value>
|
||||
</data>
|
||||
<data name="searchUserlbl" xml:space="preserve">
|
||||
<value>Search for Users</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,5 +0,0 @@
|
||||
/Searcher.ascx -crlf
|
||||
/Searcher.ascx.cs -crlf
|
||||
/Searcher.ascx.cs.bak -crlf
|
||||
/Searcher.ascx.designer.cs -crlf
|
||||
/Searcher.ascx.designer.cs.bak -crlf
|
||||
@@ -1,34 +0,0 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" EnableTheming="false" CodeBehind="Searcher.ascx.cs" Inherits="Mainsoft.Web.AspnetConfig.Searcher" %>
|
||||
<%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
Edit roles:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" >
|
||||
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
|
||||
ForeColor="#333333" GridLines="None" Width="100%">
|
||||
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Edit roles">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" Checked='<%# Bind("IsInRole") %>'
|
||||
OnCheckedChanged="Roles_Changed" Text='<%# Bind("Role") %>' />
|
||||
</ItemTemplate>
|
||||
<HeaderTemplate>
|
||||
Edit roles for user : <%# User %>
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
|
||||
<EditRowStyle BackColor="#999999" />
|
||||
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
|
||||
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
|
||||
</asp:GridView>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Searcher : System.Web.UI.UserControl
|
||||
{
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string)ViewState["User"];}
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
if (User == String.Empty || (Membership.GetUser(User)==null))
|
||||
{
|
||||
GridView1.DataSource = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
GridView1.DataSource = RolesDS.SelectUsersRole(User);
|
||||
}
|
||||
GridView1.DataBind();
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
protected void Roles_Changed(object sender, EventArgs e)
|
||||
{
|
||||
String user_name = (string)ViewState["User"];
|
||||
if (((CheckBox)sender).Checked)
|
||||
{
|
||||
try {
|
||||
Roles.AddUserToRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.Administration
|
||||
{
|
||||
public partial class Searcher : System.Web.UI.UserControl
|
||||
{
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string)ViewState["User"];}
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
if (User == String.Empty || (Membership.GetUser(User)==null))
|
||||
{
|
||||
GridView1.DataSource = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
GridView1.DataSource = RolesDS.SelectUsersRole(User);
|
||||
}
|
||||
GridView1.DataBind();
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
protected void Roles_Changed(object sender, EventArgs e)
|
||||
{
|
||||
String user_name = (string)ViewState["User"];
|
||||
if (((CheckBox)sender).Checked)
|
||||
{
|
||||
try {
|
||||
Roles.AddUserToRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Searcher {
|
||||
protected System.Web.UI.WebControls.GridView GridView1;
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.Administration {
|
||||
|
||||
public partial class Searcher {
|
||||
protected System.Web.UI.WebControls.GridView GridView1;
|
||||
}
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{724CABEB-39E5-47A7-9F72-4B81FFC56760}</ProjectGuid>
|
||||
<ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<AssemblyName>Mainsoft.Web.AspnetConfig</AssemblyName>
|
||||
<JDKName>1.6.0</JDKName>
|
||||
<GHProjectType>3</GHProjectType>
|
||||
<GHProjectKind>runtime</GHProjectKind>
|
||||
<Version>2.0</Version>
|
||||
<RootNamespace>Mainsoft.Web.AspnetConfig</RootNamespace>
|
||||
<jarserver>ipa</jarserver>
|
||||
<ApplicationServerType>tomcat</ApplicationServerType>
|
||||
<FlatWebApp>true</FlatWebApp>
|
||||
<DeployOnBuild>true</DeployOnBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;JAVA;TARGET_JVM</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<SkipValidation>True</SkipValidation>
|
||||
<KeepIntermediate>False</KeepIntermediate>
|
||||
<TargetPlatform>0</TargetPlatform>
|
||||
<AdditionalClassPath>
|
||||
</AdditionalClassPath>
|
||||
<PreCompile>True</PreCompile>
|
||||
<CompressionLevel>1</CompressionLevel>
|
||||
<DeploymentMethod>1</DeploymentMethod>
|
||||
<UseTestingPage>True</UseTestingPage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE;JAVA;TARGET_JVM</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<SkipValidation>True</SkipValidation>
|
||||
<KeepIntermediate>False</KeepIntermediate>
|
||||
<TargetPlatform>0</TargetPlatform>
|
||||
<AdditionalClassPath>
|
||||
</AdditionalClassPath>
|
||||
<PreCompile>true</PreCompile>
|
||||
<CompressionLevel>1</CompressionLevel>
|
||||
<DeploymentMethod>1</DeploymentMethod>
|
||||
<UseTestingPage>True</UseTestingPage>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
|
||||
<Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>2274</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
<UserProperties REFS-JarPath-mscorlib="..\..\..\..\..\..\lib\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\..\lib\System.jar" REFS-JarPath-system-data="..\..\..\..\..\..\lib\System.Data.jar" REFS-JarPath-system-web="..\..\..\..\..\..\lib\System.Web.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\lib\System.Xml.jar" REFS-JarPath-system-configuration="..\..\..\..\..\lib\System.Configuration.jar" REFS-JarPath-system-drawing="..\..\..\..\..\lib\System.Drawing.jar;..\..\..\..\..\lib\jai_imageio.jar;..\..\..\..\..\lib\jai_core.jar;..\..\..\..\..\lib\jai_codec.jar;..\..\..\..\..\lib\clibwrapper_jiio.jar;..\..\..\..\..\lib\mlibwrapper_jai.jar" REFS-JarPath-myfaces="" REFS-RefInfo-myfaces="repository:vmw:framework:2.0" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<ItemGroup>
|
||||
<Content Include="WEB-INF\web.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="myfaces" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="J2SE.Helpers">
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\lib\J2SE.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="aspnetconfig\CreateRole.aspx.cs">
|
||||
<DependentUpon>CreateRole.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\CreateRole.aspx.designer.cs">
|
||||
<DependentUpon>CreateRole.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\CreateUser.aspx.cs">
|
||||
<DependentUpon>CreateUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\CreateUser.aspx.designer.cs">
|
||||
<DependentUpon>CreateUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\EditUser.aspx.cs">
|
||||
<DependentUpon>EditUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\EditUser.aspx.designer.cs">
|
||||
<DependentUpon>EditUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Error.aspx.cs">
|
||||
<DependentUpon>Error.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Error.aspx.designer.cs">
|
||||
<DependentUpon>Error.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\GridButton.cs" />
|
||||
<Compile Include="aspnetconfig\GridCheckBox.cs" />
|
||||
<Compile Include="aspnetconfig\HttpHandlersSectionHandler.cs" />
|
||||
<Compile Include="aspnetconfig\ManageRole.aspx.cs">
|
||||
<DependentUpon>ManageRole.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\ManageRole.aspx.designer.cs">
|
||||
<DependentUpon>ManageRole.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\ManageUser.aspx.cs">
|
||||
<DependentUpon>ManageUser.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\ManageUser.aspx.designer.cs">
|
||||
<DependentUpon>ManageUser.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\RolesDS.cs" />
|
||||
<Compile Include="aspnetconfig\SecurError.aspx.cs">
|
||||
<DependentUpon>SecurError.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\SecurError.aspx.designer.cs">
|
||||
<DependentUpon>SecurError.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\StrUtils.cs" />
|
||||
<Compile Include="aspnetconfig\UrlUtils.cs" />
|
||||
<Compile Include="aspnetconfig\Util.Master.cs">
|
||||
<DependentUpon>Util.Master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="aspnetconfig\Util.Master.designer.cs">
|
||||
<DependentUpon>Util.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\Searcher.ascx.cs">
|
||||
<DependentUpon>Searcher.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\Searcher.ascx.designer.cs">
|
||||
<DependentUpon>Searcher.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="aspnetconfig\CreateRole.aspx" />
|
||||
<None Include="aspnetconfig\CreateUser.aspx" />
|
||||
<None Include="aspnetconfig\Default.aspx" />
|
||||
<None Include="aspnetconfig\EditUser.aspx" />
|
||||
<None Include="aspnetconfig\Error.aspx" />
|
||||
<EmbeddedResource Include="aspnetconfig\Mainsoft.Web.AspnetConfig.css" />
|
||||
<None Include="aspnetconfig\ManageRole.aspx" />
|
||||
<None Include="aspnetconfig\ManageUser.aspx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="aspnetconfig\SecurError.aspx" />
|
||||
<Content Include="aspnetconfig\Util.Master" />
|
||||
<Content Include="WEB-INF\faces-config.xml" />
|
||||
<None Include="Controls\Searcher.ascx" />
|
||||
<None Include="nomd5" />
|
||||
<EmbeddedResource Include="resources\mainsoft.jpg" />
|
||||
<EmbeddedResource Include="resources\untitled.bmp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,2 +0,0 @@
|
||||
/AssemblyInfo.cs -crlf
|
||||
/AssemblyInfo.cs.bak -crlf
|
||||
@@ -1,43 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.UI;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Mainsoft.Web.AspnetConfig")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Mainsoft.Web.AspnetConfig")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: WebResource ("Mainsoft.Web.AspnetConfig.resources.mainsoft.jpg", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.AspnetConfig.resources.untitled.bmp", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.AspnetConfig.aspnetconfig.Mainsoft.Web.AspnetConfig.css", "text/css")]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web.UI;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Mainsoft.Web.Administration")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Mainsoft.Web.Administration")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: WebResource ("Mainsoft.Web.Administration.resources.mainsoft.jpg", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.Administration.resources.untitled.bmp", "image/jpeg")]
|
||||
[assembly: WebResource ("Mainsoft.Web.Administration.aspnetconfig.Mainsoft.Web.Administration.css", "text/css")]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/faces-config.xml -crlf
|
||||
/web.xml -crlf
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE faces-config PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
|
||||
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
||||
|
||||
<faces-config>
|
||||
<application>
|
||||
|
||||
|
||||
<state-manager>Mainsoft.Web.Hosting.ServletFacesStateManager</state-manager>
|
||||
<view-handler>Mainsoft.Web.Hosting.ServletFacesViewHandler</view-handler>
|
||||
|
||||
</application>
|
||||
</faces-config>
|
||||
@@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"[]>
|
||||
<web-app>
|
||||
<display-name>Visual MainWin application</display-name>
|
||||
<description>Visual MainWin application.</description>
|
||||
<context-param>
|
||||
<param-name>EnableSessionPersistency</param-name>
|
||||
<param-value>False</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>WebFileSystemAccess</param-name>
|
||||
<param-value>Virtual</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
|
||||
<param-value>client</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.application.CONFIG_FILES</param-name>
|
||||
<param-value>/WEB-INF/faces-config.xml</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
|
||||
<param-value>.aspx</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
|
||||
</listener>
|
||||
<listener>
|
||||
<listener-class>system.Web.GH.SessionListener</listener-class>
|
||||
</listener>
|
||||
<servlet>
|
||||
<servlet-name>VmwIncludeHelperServlet</servlet-name>
|
||||
<servlet-class>system.Web.GH.IncludeHelperServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<servlet-class>GhDynamicHttpServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<servlet-class>GhStaticHttpServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.aspx</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.asmx</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.ashx</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.invoke</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.soap</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.rem</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwDynamicServlet</servlet-name>
|
||||
<url-pattern>*.axd</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwIncludeHelperServlet</servlet-name>
|
||||
<url-pattern>/servletincludehelper</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.gif</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.jpeg</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.jpg</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.png</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.html</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.htm</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.bmp</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.css</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.js</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.vbs</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.inc</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.swf</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>VmwStaticServlet</servlet-name>
|
||||
<url-pattern>*.htc</url-pattern>
|
||||
</servlet-mapping>
|
||||
<session-config>
|
||||
<session-timeout>20</session-timeout>
|
||||
</session-config>
|
||||
<welcome-file-list>
|
||||
<welcome-file>Default.aspx</welcome-file>
|
||||
</welcome-file-list>
|
||||
</web-app>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
|
||||
|
||||
<appSettings>
|
||||
|
||||
<!--
|
||||
***** Defaulf is False *****
|
||||
<add key="allowRemoteConfiguration" value="False" />-->
|
||||
</appSettings>
|
||||
<connectionStrings/>
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<roleManager enabled="true" />
|
||||
<compilation defaultLanguage="c#" debug="true"/>
|
||||
<!--
|
||||
The <authentication> section enables configuration
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Forms" />
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
|
||||
<error statusCode="403" redirect="NoAccess.htm" />
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
|
||||
|
||||
<appSettings>
|
||||
|
||||
<!--
|
||||
***** Defaulf is False *****
|
||||
<add key="allowRemoteConfiguration" value="False" />-->
|
||||
</appSettings>
|
||||
<connectionStrings/>
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<roleManager enabled="true" />
|
||||
<compilation defaultLanguage="c#" debug="true"/>
|
||||
<!--
|
||||
The <authentication> section enables configuration
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Forms" />
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
|
||||
<error statusCode="403" redirect="NoAccess.htm" />
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
|
||||
<siteMap>
|
||||
<providers>
|
||||
<add siteMapFile="web.sitemap" name="AspNetConfigXmlSiteMapProvider"
|
||||
type="Mainsoft.Web.Administration.CustomXmlSiteMapProvider" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -1,32 +0,0 @@
|
||||
/CreateRole.aspx -crlf
|
||||
/CreateRole.aspx.cs -crlf
|
||||
/CreateRole.aspx.designer.cs -crlf
|
||||
/CreateUser.aspx -crlf
|
||||
/CreateUser.aspx.cs -crlf
|
||||
/CreateUser.aspx.designer.cs -crlf
|
||||
/Default.aspx -crlf
|
||||
/Default.aspx.cs -crlf
|
||||
/Default.aspx.designer.cs -crlf
|
||||
/EditUser.aspx -crlf
|
||||
/EditUser.aspx.cs -crlf
|
||||
/EditUser.aspx.designer.cs -crlf
|
||||
/Error.aspx -crlf
|
||||
/Error.aspx.cs -crlf
|
||||
/Error.aspx.designer.cs -crlf
|
||||
/GridButton.cs -crlf
|
||||
/GridCheckBox.cs -crlf
|
||||
/Mainsoft.Web.AspnetConfig.css -crlf
|
||||
/ManageRole.aspx -crlf
|
||||
/ManageRole.aspx.cs -crlf
|
||||
/ManageRole.aspx.designer.cs -crlf
|
||||
/ManageUser.aspx -crlf
|
||||
/ManageUser.aspx.cs -crlf
|
||||
/ManageUser.aspx.designer.cs -crlf
|
||||
/RolesDS.cs -crlf
|
||||
/SecurError.aspx -crlf
|
||||
/SecurError.aspx.cs -crlf
|
||||
/SecurError.aspx.designer.cs -crlf
|
||||
/StrUtils.cs -crlf
|
||||
/Util.Master -crlf
|
||||
/Util.Master.cs -crlf
|
||||
/Util.Master.designer.cs -crlf
|
||||
@@ -1,125 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="CreateRole.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.CreateRole" %>
|
||||
<%@ Register TagPrefix="custom" Assembly="Mainsoft.Web.AspnetConfig" Namespace="Mainsoft.Web.AspnetConfig" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Create\Manage roles</td>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Main" ContentPlaceHolderID="Main" runat="server">
|
||||
<asp:MultiView runat="server" ID="mv" ActiveViewIndex="0">
|
||||
<asp:View runat="server" id="grid">
|
||||
<table class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
You can optionally add roles, or groups, that enable you to allow or deny groups of users access to specific folders in your Web site. For example, you might create roles such as "managers," "sales," or "members," each with different access to specific folders. <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top">
|
||||
<table width="100%" class="innertable" >
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
Create New Role
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
New role name:
|
||||
<asp:TextBox ID="roleName_txb" runat="server" />
|
||||
<asp:Button ID="roleName_bt" runat="server" Text="Add role" OnClick="roleName_bt_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:Label ID="error_lb" runat="server" ForeColor="Red" />
|
||||
<br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top" datakeynames="Role;">
|
||||
<asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" DataKeyNames="Role">
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Role" HeaderText="Role Name" >
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Add\Remove Role">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# string.Format("ManageRole.aspx?Role={0}", HttpUtility.UrlEncode((string)Eval("Role"))) %>'
|
||||
Text="Manage" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<custom:GridButton ID="grid_btn" runat="server" User='<%# Bind("Role") %>' OnClick="gridbtn_click" >Delete</custom:GridButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#EFF3FB" />
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Center" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
|
||||
SelectMethod="Select" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Role" Type="String" />
|
||||
</DeleteParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
<asp:View runat="server" ID="yesno" >
|
||||
<table class="innertable" width="60%">
|
||||
<tr>
|
||||
<td style="height: 80px" valign="top">
|
||||
<br />
|
||||
<asp:Image runat="server" id="Img" />
|
||||
Are you sure you want to delete the role: "<%= Role %>"?
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" style="background-color:inactivecaptiontext" >
|
||||
<asp:Button ID="yes" runat="server" Text="Yes" style="width:50px" OnClick="Click_Yes" />
|
||||
<asp:Button ID="no" runat="server" Text="No" style="width:50px" OnClick="Click_No" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class CreateRole : System.Web.UI.Page
|
||||
{
|
||||
public string Role
|
||||
{
|
||||
get { return ViewState["Role"] == null ? String.Empty : (string) ViewState["Role"]; }
|
||||
set { ViewState["Role"] = value; }
|
||||
}
|
||||
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
if (mv.ActiveViewIndex == 1) {
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
}
|
||||
else {
|
||||
((Button) Master.FindControl ("Back")).Visible = true;
|
||||
}
|
||||
|
||||
base.OnPreRender (e);
|
||||
Roles_gv.DataBind ();
|
||||
}
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
Img.ImageUrl = this.Page.ClientScript.GetWebResourceUrl (typeof (CreateRole), "Mainsoft.Web.AspnetConfig.resources.untitled.bmp");
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "Default.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected void gridbtn_click (object sender, EventArgs e)
|
||||
{
|
||||
Role = ((GridButton) sender).User;
|
||||
mv.ActiveViewIndex = 1;
|
||||
}
|
||||
|
||||
protected void roleName_bt_Click (object sender, EventArgs e)
|
||||
{
|
||||
if (roleName_txb.Text != "") {
|
||||
try {
|
||||
Roles.CreateRole (roleName_txb.Text);
|
||||
error_lb.Text = "";
|
||||
}
|
||||
catch (Exception ex) {
|
||||
error_lb.Text = ex.Message;
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
else {
|
||||
error_lb.Text = "Role name cannot be empty!";
|
||||
}
|
||||
}
|
||||
|
||||
protected void Click_No (object sender, EventArgs e)
|
||||
{
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
|
||||
protected void Click_Yes (object sender, EventArgs e)
|
||||
{
|
||||
RolesDS.Delete (Role);
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class CreateRole {
|
||||
protected System.Web.UI.WebControls.MultiView mv;
|
||||
protected System.Web.UI.WebControls.View grid;
|
||||
protected System.Web.UI.WebControls.TextBox roleName_txb;
|
||||
protected System.Web.UI.WebControls.Button roleName_bt;
|
||||
protected System.Web.UI.WebControls.Label error_lb;
|
||||
protected System.Web.UI.WebControls.GridView Roles_gv;
|
||||
protected System.Web.UI.WebControls.ObjectDataSource ObjectDataSource1;
|
||||
protected System.Web.UI.WebControls.View yesno;
|
||||
protected System.Web.UI.WebControls.Image Img;
|
||||
protected System.Web.UI.WebControls.Button yes;
|
||||
protected System.Web.UI.WebControls.Button no;
|
||||
}
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="CreateUser.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.CreateUser" %>
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Create user</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<table style="border-right: thin solid; padding-right: 2px; border-top: thin solid; padding-left: 2px; padding-bottom: 2px; border-left: thin solid; padding-top: 2px; border-bottom: thin solid">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
<asp:Label ID="text_lbl" runat="server" Text="Add a user by entering a user name, password, and e-mail address on this page." />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "60%" valign="top">
|
||||
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F6F3"
|
||||
BorderColor="#E6E2D8" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" LoginCreatedUser="false"
|
||||
Font-Size="0.8em" Width="353px" ContinueDestinationPageUrl="CreateUser.aspx" FinishDestinationPageUrl="CreateUser.aspx" EmailRegularExpression="\S+@\S+\.\S+">
|
||||
<WizardSteps>
|
||||
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
|
||||
<ContentTemplate>
|
||||
<table border="0" style="font-size: 100%; width: 353px; font-family: Verdana">
|
||||
<tr>
|
||||
<td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d;
|
||||
text-align: left">
|
||||
Sign Up for Your New Account</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
|
||||
ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
|
||||
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
|
||||
ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
|
||||
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Email" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
|
||||
ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Question" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
|
||||
ErrorMessage="Security question is required." ToolTip="Security question is required."
|
||||
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label></td>
|
||||
<td>
|
||||
<asp:TextBox ID="Answer" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
|
||||
ErrorMessage="Security answer is required." ToolTip="Security answer is required."
|
||||
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
|
||||
ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
|
||||
ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<asp:RegularExpressionValidator ID="EmailRegExp" runat="server" ControlToValidate="Email"
|
||||
Display="Dynamic" ErrorMessage="Please enter a different e-mail." ValidationExpression="\S+@\S+\.\S+"
|
||||
ValidationGroup="CreateUserWizard1"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2" style="color: red">
|
||||
<asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:CreateUserWizardStep>
|
||||
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
|
||||
<ContentTemplate>
|
||||
<table border="0" style="font-size: 100%; width: 353px; font-family: Verdana">
|
||||
<tr>
|
||||
<td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d;
|
||||
text-align: left">
|
||||
Create User</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<br />
|
||||
|
||||
Complete.<br />
|
||||
Your account has been successfully created.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<asp:Button ID="ContinueButton" runat="server" BackColor="#FFFBFF" BorderColor="#CCCCCC"
|
||||
BorderStyle="Solid" BorderWidth="1px" CausesValidation="False" CommandName="Continue"
|
||||
Font-Names="Verdana" ForeColor="#284775" Text="Continue" ValidationGroup="CreateUserWizard1" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:CompleteWizardStep>
|
||||
</WizardSteps>
|
||||
<SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" VerticalAlign="Top" />
|
||||
<TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
|
||||
<SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" />
|
||||
<NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
|
||||
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Center" />
|
||||
<CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
|
||||
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
|
||||
<ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"
|
||||
BorderWidth="1px" Font-Names="Verdana" ForeColor="#284775" />
|
||||
<StepStyle BorderWidth="0px" />
|
||||
</asp:CreateUserWizard>
|
||||
</td>
|
||||
<td width= "60%" valign="top">
|
||||
<table width="100%" style="background-color: #f7f6f3; border-right: #e6e2d8 1px solid; border-top: #e6e2d8 1px solid; border-left: #e6e2d8 1px solid; border-bottom: #e6e2d8 1px solid;" >
|
||||
<tr>
|
||||
<td width="100%" style="text-align: center; background-color: #5D7B9D; font-weight:bold; font-size:0.9em; color:White;text-align:center; height: 19px;">
|
||||
Roles
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<asp:CheckBoxList ID="roles_lst" runat="server">
|
||||
</asp:CheckBoxList></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Active User
|
||||
<asp:CheckBox ID="active_chb" runat="server" Checked="true" Enabled="true" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
@@ -1,85 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class CreateUser : System.Web.UI.Page
|
||||
{
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
roles_lst.DataBind ();
|
||||
base.OnPreRender (e);
|
||||
if (CreateUserWizard1.ActiveStepIndex != 0) {
|
||||
text_lbl.Visible = false;
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
active_chb.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack) {
|
||||
roles_lst.DataValueField = "Role";
|
||||
roles_lst.DataSource = RolesDS.Select ();
|
||||
}
|
||||
CreateUserWizard1.CreatingUser += new LoginCancelEventHandler (CreateUserWizard1_CreatingUser);
|
||||
CreateUserWizard1.CreatedUser += new EventHandler (CreateUserWizard1_CreatedUser);
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "Default.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateUserWizard1_CreatedUser (object sender, EventArgs e)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser (((CreateUserWizard) sender).UserName);
|
||||
roles_lst.Enabled = false;
|
||||
|
||||
int i = 0;
|
||||
while (i < roles_lst.Items.Count) {
|
||||
if (roles_lst.Items[i].Selected) {
|
||||
try {
|
||||
Roles.AddUserToRole (((CreateUserWizard) sender).UserName, roles_lst.Items[i].Text);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
((CreateUserWizard) sender).UnknownErrorMessage = ex.Message;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateUserWizard1_CreatingUser (object sender, LoginCancelEventArgs e)
|
||||
{
|
||||
((CreateUserWizard) sender).DisableCreatedUser = !active_chb.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class CreateUser {
|
||||
protected System.Web.UI.WebControls.Label text_lbl;
|
||||
protected System.Web.UI.WebControls.CreateUserWizard CreateUserWizard1;
|
||||
protected System.Web.UI.WebControls.CreateUserWizardStep CreateUserWizardStep1;
|
||||
protected System.Web.UI.WebControls.CompleteWizardStep CompleteWizardStep1;
|
||||
protected System.Web.UI.WebControls.CheckBoxList roles_lst;
|
||||
protected System.Web.UI.WebControls.CheckBox active_chb;
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="Default.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.Default" %>
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td style="color: #333333">Home</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ContentPlaceHolderID="Main">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
You can use the Web Site Administration Tool to manage all the security settings for your application. You can set up users and passwords (authentication), and create roles (groups of users). By default, user information is stored in a Cloudscape database in the Data folder of your Web project. If you want to store user information in a different database, you may configure a different provider in the web.config file.
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="innertable" width="70%" >
|
||||
<tr>
|
||||
<td class="controlheader">
|
||||
Users
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%= User_count %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="CreateUser.aspx" OnLoad="UsersLinks_Load">Create user</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="ManageUser.aspx" OnLoad="UsersLinks_Load">Manage users</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="innertable" width="70%">
|
||||
<tr>
|
||||
<td class="controlheader">
|
||||
Roles
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%= Roles_count %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="CreateRole.aspx" OnLoad="HyperLink1_Load" >Create or manage roles</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
@@ -1,109 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Default : System.Web.UI.Page
|
||||
{
|
||||
private bool IsPortalRoleProvider;
|
||||
private bool IsPortalMembershipProvider;
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
try {
|
||||
IsPortalRoleProvider = (Roles.Provider).GetType ().ToString () == "Mainsoft.Web.Security.WPGroupsRoleProvider";
|
||||
}
|
||||
catch{
|
||||
}
|
||||
IsPortalMembershipProvider = (Membership.Provider).GetType().ToString () == "Mainsoft.Web.Security.WPMembershipProvider";
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public string User_count
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPortalMembershipProvider) {
|
||||
return "You cannot create or manage users when WPMembershipProvider is configured as the default provider.";
|
||||
}
|
||||
else {
|
||||
MembershipUserCollection user_collection = Membership.GetAllUsers ();
|
||||
return "Created users :" + user_collection.Count.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Roles_count
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPortalRoleProvider) {
|
||||
return @"You cannot create or manage roles when WPGroupsRoleProvider is configured as the default provider.";
|
||||
}
|
||||
else if (Roles.Enabled) {
|
||||
string[] list = Roles.GetAllRoles ();
|
||||
return "Existing roles :" + list.Length.ToString ();
|
||||
}
|
||||
else
|
||||
return @"In order to create or manage roles, the roleManger key must be enabled. To enable roleManager, please modify your Web.config file as follows: <br />
|
||||
<configuration xmlns=""http://schemas.microsoft.com/.NetConfiguration/v2.0""> <br />
|
||||
<system.web> <br />
|
||||
<roleManager enabled=""true"" /> <br />
|
||||
</system.web> <br />
|
||||
</configuration>";
|
||||
}
|
||||
}
|
||||
|
||||
protected void HyperLink1_Load (object sender, EventArgs e)
|
||||
{
|
||||
if (!Roles.Enabled || IsPortalRoleProvider)
|
||||
((HyperLink) sender).Visible = false;
|
||||
}
|
||||
|
||||
protected void UsersLinks_Load (object sender, EventArgs e)
|
||||
{
|
||||
if (IsPortalMembershipProvider) {
|
||||
((HyperLink) sender).Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Default {
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink1;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink2;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink3;
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="EditUser.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.EditUser" %>
|
||||
<%@ Register TagPrefix="custom" TagName="searcher" Src="~/Controls/Searcher.ascx" %>
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #284E98"><a class="SiteMap" href="ManageUser.aspx" title="Manage user" runat="server">Manage user</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Edit user</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
|
||||
<asp:View ID="updateUser" runat="server" >
|
||||
<div>
|
||||
<table width="100%" class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
Use this page to edit user information and to specify what roles a user belongs in.
|
||||
<br /> <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="70%" class="innertable" align="left" valign="top">
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="100%" class="controlheader" colspan="3">
|
||||
User
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
User ID:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="userid_txb" runat="server" Enabled="false" />
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span style="font-size: 20px; color: red">*</span> E-mail address:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="email_txb" runat="server"></asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:CheckBox ID="active_chb" runat="server" /> Active user
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Description:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="desc_txb" runat="server">[not set]</asp:TextBox>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="save_bt" runat="server" Text="Save" OnClick="save_bt_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="innertable" valign="top" style="width: 82%" >
|
||||
<custom:searcher ID="srch" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
(<span style="font-size: 20px; color: red">*</span>)Required field <br /><br />
|
||||
<asp:RequiredFieldValidator ID="required_email_validator" runat="server" ControlToValidate="email_txb" ErrorMessage="Email required" />
|
||||
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="email_txb" ValidationExpression="\S+@\S+\.\S+" runat="server" ErrorMessage="Email format is invalid"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</asp:View>
|
||||
<asp:View ID="successupdate" runat="server">
|
||||
<div>
|
||||
<table width="100%" class="maintable">
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
User Management
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" style="height: 100px" valign="top" align="left">
|
||||
You have successfully updated the user
|
||||
<asp:Label ID="name_lbl" runat="server" /> <br /> <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" align="right">
|
||||
<asp:Button ID="success_btn" runat="server" Text="OK" OnClick="success_btn_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</asp:Content>
|
||||
@@ -1,96 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class EditUser : System.Web.UI.Page
|
||||
{
|
||||
String user_name;
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
user_name = Request.QueryString["User"];
|
||||
srch.User = user_name;
|
||||
if (!IsPostBack) {
|
||||
FillUserData (user_name);
|
||||
name_lbl.Text = user_name;
|
||||
}
|
||||
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "ManageUser.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
if (IsPostBack) {
|
||||
if (MultiView1.ActiveViewIndex == 1) {
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
}
|
||||
else {
|
||||
((Button) Master.FindControl ("Back")).Visible = true;
|
||||
}
|
||||
}
|
||||
base.OnPreRender (e);
|
||||
}
|
||||
|
||||
void FillUserData (string user_name)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser (user_name);
|
||||
userid_txb.Text = user.UserName;
|
||||
email_txb.Text = user.Email;
|
||||
active_chb.Checked = user.IsApproved;
|
||||
desc_txb.Text = user.Comment;
|
||||
}
|
||||
|
||||
protected void roles_lst_DataBound (object sender, EventArgs e)
|
||||
{
|
||||
foreach (ListItem item in ((CheckBoxList) sender).Items) {
|
||||
item.Selected = Boolean.Parse (item.Value);
|
||||
}
|
||||
}
|
||||
|
||||
protected void save_bt_Click (object sender, EventArgs e)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser (user_name);
|
||||
user.IsApproved = active_chb.Checked;
|
||||
user.Email = email_txb.Text;
|
||||
user.Comment = desc_txb.Text;
|
||||
Membership.UpdateUser (user);
|
||||
MultiView1.ActiveViewIndex = 1;
|
||||
}
|
||||
|
||||
protected void success_btn_Click (object sender, EventArgs e)
|
||||
{
|
||||
Server.Transfer ("ManageUser.aspx");
|
||||
}
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class EditUser {
|
||||
protected System.Web.UI.WebControls.MultiView MultiView1;
|
||||
protected System.Web.UI.WebControls.View updateUser;
|
||||
protected System.Web.UI.WebControls.TextBox userid_txb;
|
||||
protected System.Web.UI.WebControls.TextBox email_txb;
|
||||
protected System.Web.UI.WebControls.CheckBox active_chb;
|
||||
protected System.Web.UI.WebControls.TextBox desc_txb;
|
||||
protected System.Web.UI.WebControls.Button save_bt;
|
||||
protected Mainsoft.Web.AspnetConfig.Searcher srch;
|
||||
protected System.Web.UI.WebControls.RequiredFieldValidator required_email_validator;
|
||||
protected System.Web.UI.WebControls.RegularExpressionValidator RegularExpressionValidator1;
|
||||
protected System.Web.UI.WebControls.View successupdate;
|
||||
protected System.Web.UI.WebControls.Label name_lbl;
|
||||
protected System.Web.UI.WebControls.Button success_btn;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Error.aspx.cs" Theme="" StylesheetTheme="" Inherits="Mainsoft.Web.AspnetConfig.Error" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>ASP.Net Web Application Administration</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div style="font-weight: bold; font-size: 20pt; color: red">
|
||||
Error occured on this request ! Please try again !
|
||||
</div>
|
||||
<div>
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Default.aspx">Administration utility home page</asp:HyperLink>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Error : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Error {
|
||||
protected System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink1;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public class GridButton : LinkButton
|
||||
{
|
||||
[Bindable (true)]
|
||||
public string User
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string) ViewState["User"]; }
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
-247
@@ -1,247 +0,0 @@
|
||||
//
|
||||
// System.Web.Configuration.HandlerFactoryConfiguration.cs
|
||||
//
|
||||
//
|
||||
// Authors:
|
||||
// Miguel de Icaza ([email protected])
|
||||
// Gonzalo Paniagua Javier ([email protected])
|
||||
//
|
||||
// (C) 2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Web.Util;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace System.Web.Configuration {
|
||||
|
||||
class FileMatchingInfo {
|
||||
public string MatchExact;
|
||||
public string MatchExpr;
|
||||
|
||||
// If set, we can fast-path the patch with string.EndsWith (FMI.EndsWith)
|
||||
public string EndsWith;
|
||||
public Regex RegExp;
|
||||
|
||||
public FileMatchingInfo (string s)
|
||||
{
|
||||
MatchExpr = s;
|
||||
|
||||
if (s[0] == '*' && (s.IndexOf ('*', 1) == -1))
|
||||
EndsWith = s.Substring (1);
|
||||
|
||||
if (s.IndexOf ('*') == -1)
|
||||
MatchExact = "/" + s;
|
||||
|
||||
if (MatchExpr != "*") {
|
||||
string expr = MatchExpr.Replace(".", "\\.").Replace("?", "\\?").Replace("*", ".*");
|
||||
if (expr.Length > 0 && expr [0] =='/')
|
||||
expr = expr.Substring (1);
|
||||
|
||||
expr += "\\z";
|
||||
RegExp = new Regex (expr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HttpHandler {
|
||||
// If `null', we are the "*" match
|
||||
public string OriginalVerb;
|
||||
public string OriginalPath;
|
||||
|
||||
public string [] Verbs;
|
||||
public FileMatchingInfo [] files;
|
||||
|
||||
// To support lazy loading we keep the name around.
|
||||
public string TypeName;
|
||||
Type type;
|
||||
|
||||
object instance;
|
||||
|
||||
public HttpHandler (string verb, string path, string typename, Type t)
|
||||
{
|
||||
OriginalVerb = verb;
|
||||
OriginalPath = path;
|
||||
|
||||
if (verb != "*")
|
||||
Verbs = verb.Split (',');
|
||||
string [] paths = path.Split (',');
|
||||
files = new FileMatchingInfo [paths.Length];
|
||||
|
||||
int i = 0;
|
||||
foreach (string s in paths)
|
||||
files [i++] = new FileMatchingInfo (s);
|
||||
|
||||
this.TypeName = typename;
|
||||
type = t;
|
||||
}
|
||||
|
||||
//
|
||||
// Loads the a type by name and verifies that it implements
|
||||
// IHttpHandler or IHttpHandlerFactory
|
||||
//
|
||||
public static Type LoadType (string type_name)
|
||||
{
|
||||
Type t;
|
||||
|
||||
try {
|
||||
t = Type.GetType (type_name, true);
|
||||
} catch (Exception e) {
|
||||
throw new HttpException (String.Format ("Failed to load httpHandler type `{0}'", type_name));
|
||||
}
|
||||
|
||||
if (typeof (IHttpHandler).IsAssignableFrom (t) ||
|
||||
typeof (IHttpHandlerFactory).IsAssignableFrom (t))
|
||||
return t;
|
||||
|
||||
throw new HttpException (String.Format ("Type {0} does not implement IHttpHandler or IHttpHandlerFactory", type_name));
|
||||
}
|
||||
|
||||
public bool PathMatches (string p)
|
||||
{
|
||||
int slash = p.LastIndexOf ('/');
|
||||
string orig = p;
|
||||
if (slash != -1)
|
||||
p = p.Substring (slash);
|
||||
|
||||
for (int j = files.Length; j > 0; ){
|
||||
j--;
|
||||
FileMatchingInfo fm = files [j];
|
||||
|
||||
if (fm.MatchExact != null)
|
||||
return fm.MatchExact.Length == p.Length && StrUtils.EndsWith (p, fm.MatchExact);
|
||||
|
||||
if (fm.EndsWith != null)
|
||||
return StrUtils.EndsWith (p, fm.EndsWith);
|
||||
|
||||
if (fm.MatchExpr == "*")
|
||||
return true;
|
||||
|
||||
/* convert to regexp */
|
||||
return fm.RegExp.IsMatch (orig);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Loads the handler, possibly delay-loaded.
|
||||
public object GetHandlerInstance ()
|
||||
{
|
||||
IHttpHandler ihh = instance as IHttpHandler;
|
||||
|
||||
if (instance == null || (ihh != null && !ihh.IsReusable)){
|
||||
if (type == null)
|
||||
type = LoadType (TypeName);
|
||||
|
||||
instance = Activator.CreateInstance (type);
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
class HandlerFactoryConfiguration {
|
||||
ArrayList handlers;
|
||||
HandlerFactoryConfiguration parent;
|
||||
int parent_items;
|
||||
|
||||
public HandlerFactoryConfiguration (HandlerFactoryConfiguration parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
|
||||
if (parent != null) {
|
||||
handlers = new ArrayList (parent.handlers);
|
||||
parent_items = handlers.Count;
|
||||
} else {
|
||||
handlers = new ArrayList ();
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
handlers.Clear ();
|
||||
}
|
||||
|
||||
public void Add (string verb, string path, string type_name, bool validate)
|
||||
{
|
||||
Type type;
|
||||
|
||||
if (validate){
|
||||
type = HttpHandler.LoadType (type_name);
|
||||
if (type == null)
|
||||
throw new HttpException (String.Format ("Can not load {0}", type_name));
|
||||
} else
|
||||
type = null;
|
||||
|
||||
handlers.Add (new HttpHandler (verb, path, type_name, type));
|
||||
}
|
||||
|
||||
public bool Remove (string verb, string path)
|
||||
{
|
||||
for (int i = handlers.Count - 1; i >= 0; i--) {
|
||||
HttpHandler handler = (HttpHandler) handlers [i];
|
||||
|
||||
if (verb == handler.OriginalVerb && path == handler.OriginalPath){
|
||||
handlers.RemoveAt (i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public object LocateHandler (string verb, string filepath)
|
||||
{
|
||||
int start, end;
|
||||
int count = handlers.Count;
|
||||
for (int k = 0; k < 2; k++) {
|
||||
// First iteration searches for the mapping in the items added to this
|
||||
// instance. The second one searches through the parent items if any.
|
||||
start = (k == 0) ? parent_items : 0;
|
||||
end = (k == 0) ? count : parent_items;
|
||||
for (int i = start; i < end; i++) {
|
||||
HttpHandler handler = (HttpHandler) handlers [i];
|
||||
|
||||
if (handler.Verbs == null){
|
||||
if (handler.PathMatches (filepath))
|
||||
return handler.GetHandlerInstance ();
|
||||
continue;
|
||||
}
|
||||
|
||||
string [] verbs = handler.Verbs;
|
||||
for (int j = verbs.Length; j > 0; ){
|
||||
j--;
|
||||
if (verbs [j] != verb)
|
||||
continue;
|
||||
if (handler.PathMatches (filepath))
|
||||
return handler.GetHandlerInstance ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// System.Web.Configuration.HttpHandlersSectionHandler
|
||||
//
|
||||
// Authors:
|
||||
// Gonzalo Paniagua Javier ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian, Inc (http://www.ximian.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Xml;
|
||||
using System.Globalization;
|
||||
using System;
|
||||
|
||||
namespace Mainsoft.Web.Configuration
|
||||
{
|
||||
|
||||
|
||||
internal class HandlersUtil
|
||||
{
|
||||
private HandlersUtil ()
|
||||
{
|
||||
}
|
||||
|
||||
static internal string ExtractAttributeValue (string attKey, XmlNode node)
|
||||
{
|
||||
return ExtractAttributeValue (attKey, node, false);
|
||||
}
|
||||
|
||||
static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional)
|
||||
{
|
||||
return ExtractAttributeValue (attKey, node, optional, false);
|
||||
}
|
||||
|
||||
static internal string ExtractAttributeValue (string attKey, XmlNode node, bool optional,
|
||||
bool allowEmpty)
|
||||
{
|
||||
if (node.Attributes == null) {
|
||||
if (optional)
|
||||
return null;
|
||||
|
||||
ThrowException ("Required attribute not found: " + attKey, node);
|
||||
}
|
||||
|
||||
XmlNode att = node.Attributes.RemoveNamedItem (attKey);
|
||||
if (att == null) {
|
||||
if (optional)
|
||||
return null;
|
||||
ThrowException ("Required attribute not found: " + attKey, node);
|
||||
}
|
||||
|
||||
string value = att.Value;
|
||||
if (!allowEmpty && value == String.Empty) {
|
||||
string opt = optional ? "Optional" : "Required";
|
||||
ThrowException (opt + " attribute is empty: " + attKey, node);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
static internal void ThrowException (string msg, XmlNode node)
|
||||
{
|
||||
if (node != null && node.Name != String.Empty)
|
||||
msg = msg + " (node name: " + node.Name + ") ";
|
||||
throw new ConfigurationException (msg, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
|
||||
.appHeader
|
||||
{
|
||||
background-image: url(Images/mainsoft.jpg);
|
||||
background-repeat :no-repeat;
|
||||
height: 139px;
|
||||
width: 100%;
|
||||
border-bottom: 1 solid #7daad4;
|
||||
background-color:White;
|
||||
width: 100%;
|
||||
height: 133px;
|
||||
}
|
||||
|
||||
.controlheader {
|
||||
text-align: center;
|
||||
background-color: #5D7B9D;
|
||||
font-weight:bold;
|
||||
font-size:0.9em;
|
||||
color:White;
|
||||
text-align:center;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.maintable {
|
||||
border-right: thin solid;
|
||||
padding-right: 2px;
|
||||
border-top: thin solid;
|
||||
padding-left: 2px;
|
||||
padding-bottom: 2px;
|
||||
border-left: thin solid;
|
||||
padding-top: 2px;
|
||||
border-bottom: thin solid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.innertable
|
||||
{
|
||||
background-color: #f7f6f3;
|
||||
border-right: #e6e2d8 1px solid;
|
||||
border-top: #e6e2d8 1px solid;
|
||||
border-left: #e6e2d8 1px solid;
|
||||
border-bottom: #e6e2d8 1px solid;
|
||||
}
|
||||
|
||||
.h1{
|
||||
font-size: 25px;
|
||||
vertical-align: middle;
|
||||
color: #6699ff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bordredtable
|
||||
{
|
||||
border-right: #6699ff 5px solid;
|
||||
padding-right: 40px;
|
||||
border-top: #6699ff 5px solid;
|
||||
padding-left: 40px;
|
||||
padding-bottom: 40px;
|
||||
border-left: #6699ff 5px solid;
|
||||
padding-top: 40px;
|
||||
border-bottom: #6699ff 5px solid;
|
||||
width: 90%;
|
||||
height: 500px;
|
||||
margin:5%;
|
||||
}
|
||||
|
||||
|
||||
BODY,TABLE,TR,TD
|
||||
{
|
||||
font-family: Arial;
|
||||
font-size: 11pt;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="ManageRole.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.MenageRole" %>
|
||||
<%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #284E98;"><a class="SiteMap" href="CreateRole.aspx" title="Create\Manage roles" runat="server">Create\Manage roles</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Manage roles</td>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<table class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
Use this page to manage the members in the specified role. To add a user to the role, search for the user name and then select the User Is In Role check box for that user.
|
||||
<br />
|
||||
Role:
|
||||
<asp:Label ID="role_lbl" runat="server" /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top">
|
||||
<table width="100%" class="innertable" >
|
||||
<tr>
|
||||
<td width="100%" class="controlheader">
|
||||
Search for Users
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Search for Users
|
||||
<asp:DropDownList ID="searchBy_dl" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Name">User Name</asp:ListItem>
|
||||
<asp:ListItem Value="Mail">E-Mail</asp:ListItem>
|
||||
</asp:DropDownList> <asp:TextBox ID="user_txt" runat="server"></asp:TextBox>
|
||||
|
||||
<asp:Button ID="searchUser_bt" runat="server" Text="Search" /> <br />
|
||||
Wildcard characters * and ? are permitted. <br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top" datakeynames="Role;">
|
||||
<asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" AllowPaging="True" PageSize="5">
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:BoundField DataField="User" HeaderText="User Name" />
|
||||
<asp:TemplateField HeaderText="User Is In Role">
|
||||
<ItemTemplate>
|
||||
<custom:GridCheckBox ID="Check" runat="server" AutoPostBack="true" Checked='<%# Bind("InRole") %>'
|
||||
User='<%# Bind("User") %>' OnCheckedChanged="CheckBox_CheckedChanged" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#EFF3FB" />
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Left" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
|
||||
SelectMethod="CreateManageRoleTable" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Role" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:QueryStringParameter Name="role" QueryStringField="Role" Type="String" />
|
||||
<asp:ControlParameter ControlID="user_txt" Name="searchtag" PropertyName="Text"
|
||||
Type="String" DefaultValue="""" />
|
||||
<asp:ControlParameter ControlID="searchBy_dl" Name="searchby" PropertyName="SelectedValue"
|
||||
Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:Content>
|
||||
@@ -1,76 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class MenageRole : System.Web.UI.Page
|
||||
{
|
||||
String role;
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
role = Request.QueryString["Role"];
|
||||
if (!Roles.RoleExists (role)) {
|
||||
Server.Transfer ("Error.aspx");
|
||||
}
|
||||
role_lbl.Text = role;
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "CreateRole.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
Roles_gv.DataBind ();
|
||||
base.OnPreRender (e);
|
||||
}
|
||||
|
||||
public void CheckBox_CheckedChanged (object sender, EventArgs e)
|
||||
{
|
||||
string user = ((GridCheckBox) sender).User;
|
||||
if (((GridCheckBox) sender).Checked) {
|
||||
try {
|
||||
Roles.AddUserToRole (user, role);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user, role);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class MenageRole {
|
||||
protected System.Web.UI.WebControls.Label role_lbl;
|
||||
protected System.Web.UI.WebControls.DropDownList searchBy_dl;
|
||||
protected System.Web.UI.WebControls.TextBox user_txt;
|
||||
protected System.Web.UI.WebControls.Button searchUser_bt;
|
||||
protected System.Web.UI.WebControls.GridView Roles_gv;
|
||||
protected System.Web.UI.WebControls.ObjectDataSource ObjectDataSource1;
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="ManageUser.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.ManageUser" %>
|
||||
<%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
<%@ Register TagPrefix="custom" TagName="searcher" Src="~/Controls/Searcher.ascx" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="SiteMapLinks" runat="server">
|
||||
<td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
|
||||
<td> >> </td>
|
||||
<td style="color: #333333">Manage user</td>
|
||||
</asp:Content>
|
||||
<asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
|
||||
<asp:MultiView ID="mv" ActiveViewIndex="0" runat="server">
|
||||
<asp:View ID="manage" runat="server" >
|
||||
<table class="maintable">
|
||||
<tr>
|
||||
<td colspan="2" width="100%" style="height: 21px">
|
||||
Click Edit User to view or change the user's password or other properties. To assign roles to the selected user, select the appropriate check boxes on the right. To prevent users from logging in to your application while retaining their information in your database, set the status to inactive by clearing the check box.
|
||||
<br /> <br /> <br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "100%" valign="top" style="height: 360px">
|
||||
<table width="100%" class="innertable" >
|
||||
<tr>
|
||||
<td width="100%" colspan="2" class="controlheader">
|
||||
Search for Users
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
Search by :
|
||||
<asp:DropDownList ID="searchBy_lbx" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Name">User Name</asp:ListItem>
|
||||
<asp:ListItem Value="Mail">E-Mail</asp:ListItem>
|
||||
</asp:DropDownList> <asp:TextBox ID="user_txt" runat="server"></asp:TextBox>
|
||||
|
||||
<asp:Button ID="searchUser_bt" runat="server" Text="Search" /> <br />
|
||||
Wildcard characters * and ? are permitted. <br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width= "70%" valign="top" >
|
||||
<asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" AllowPaging="True" PageSize="5" DataKeyNames="User" >
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Active">
|
||||
<ItemTemplate>
|
||||
<custom:GridCheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Active") %>' AutoPostBack="true"
|
||||
OnCheckedChanged="CheckBox_CheckedChanged" User='<%# Bind("User") %>' />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="User" HeaderText="User Name" >
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl='<%# string.Format("EditUser.aspx?User={0}", HttpUtility.UrlEncode((string)Eval("User"))) %>'
|
||||
Text="Edit User" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ShowHeader="False">
|
||||
<ItemTemplate>
|
||||
<custom:GridButton ID="GridButton1" runat="server" User='<%# Bind("User") %>' OnClick="Delete_Click" >Delete User</custom:GridButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<custom:GridButton ID="grid_btn" runat="server" User='<%# Bind("User") %>' OnClick="gridbtn_click" OnLoad="gridbtn_load">Edit roles</custom:GridButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle BackColor="#EFF3FB" />
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
|
||||
ForeColor="White" HorizontalAlign="Center" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteUser"
|
||||
SelectMethod="SelectUser" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="User" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:ControlParameter ControlID="user_txt" DefaultValue="""" Name="searchtag"
|
||||
PropertyName="Text" Type="String" />
|
||||
<asp:ControlParameter ControlID="searchBy_lbx" DefaultValue="" Name="searchby" PropertyName="SelectedValue"
|
||||
Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
</td>
|
||||
<td width="30%" valign="top">
|
||||
<custom:Searcher ID="srch" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="CreateUser.aspx">Create new user</asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
<asp:View ID="quest" runat="server">
|
||||
<table class="innertable" width="60%">
|
||||
<tr>
|
||||
<td style="height: 80px" valign="top">
|
||||
<br />
|
||||
<asp:Image runat="server" ID="Img" />
|
||||
Are you sure you want to delete the user: "<%= User_name %>"? <br />
|
||||
All information for this user will be deleted, including the user name, the user's membership in roles, and any profile property values associated with this user.
|
||||
<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" style="background-color:inactivecaptiontext" >
|
||||
<asp:Button ID="yes" runat="server" Text="Yes" style="width:50px" OnClick="Click_Yes" />
|
||||
<asp:Button ID="no" runat="server" Text="No" style="width:50px" OnClick="Click_No" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</asp:View>
|
||||
</asp:MultiView>
|
||||
</asp:Content>
|
||||
@@ -1,138 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class ManageUser : System.Web.UI.Page
|
||||
{
|
||||
public string User_name
|
||||
{
|
||||
get { return ViewState["User"] == null ? String.Empty : (string) ViewState["User"]; }
|
||||
set { ViewState["User"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
Button bt = Master.FindControl ("Back") as Button;
|
||||
if (bt != null) {
|
||||
bt.PostBackUrl = "Default.aspx";
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
Img.ImageUrl = this.Page.ClientScript.GetWebResourceUrl (typeof (ManageUser), "Mainsoft.Web.AspnetConfig.resources.untitled.bmp");
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
protected override void OnPreRender (EventArgs e)
|
||||
{
|
||||
if (IsPostBack) {
|
||||
Roles_gv.DataBind ();
|
||||
if (mv.ActiveViewIndex == 1) {
|
||||
((Button) Master.FindControl ("Back")).Visible = false;
|
||||
}
|
||||
else {
|
||||
((Button) Master.FindControl ("Back")).Visible = true;
|
||||
}
|
||||
}
|
||||
base.OnPreRender (e);
|
||||
}
|
||||
|
||||
public void CheckBox_CheckedChanged (object sender, EventArgs e)
|
||||
{
|
||||
string user_name = ((GridCheckBox) sender).User;
|
||||
MembershipUser user = Membership.GetUser (user_name);
|
||||
if (((GridCheckBox) sender).Checked) {
|
||||
user.IsApproved = true;
|
||||
Membership.UpdateUser (user);
|
||||
}
|
||||
else {
|
||||
user.IsApproved = false;
|
||||
Membership.UpdateUser (user);
|
||||
}
|
||||
}
|
||||
|
||||
protected void gridbtn_click (object sender, EventArgs e)
|
||||
{
|
||||
srch.User = ((GridButton) sender).User;
|
||||
}
|
||||
|
||||
protected void Roles_Changed (object sender, EventArgs e)
|
||||
{
|
||||
String user_name = (string) ViewState["User_name"];
|
||||
if (((CheckBox) sender).Checked) {
|
||||
try {
|
||||
Roles.AddUserToRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
Roles.RemoveUserFromRole (user_name, ((CheckBox) sender).Text);
|
||||
}
|
||||
catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Click_No (object sender, EventArgs e)
|
||||
{
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
|
||||
protected void Click_Yes (object sender, EventArgs e)
|
||||
{
|
||||
RolesDS.DeleteUser (User_name);
|
||||
//Roles_gv.DataBind ();
|
||||
mv.ActiveViewIndex = 0;
|
||||
}
|
||||
|
||||
protected void Delete_Click (object sender, EventArgs e)
|
||||
{
|
||||
User_name = ((GridButton) sender).User;
|
||||
mv.ActiveViewIndex = 1;
|
||||
}
|
||||
|
||||
protected void gridbtn_load (object sender, EventArgs e)
|
||||
{
|
||||
if (!Roles.Enabled) {
|
||||
((GridButton)sender).Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class ManageUser {
|
||||
protected System.Web.UI.WebControls.MultiView mv;
|
||||
protected System.Web.UI.WebControls.View manage;
|
||||
protected System.Web.UI.WebControls.DropDownList searchBy_lbx;
|
||||
protected System.Web.UI.WebControls.TextBox user_txt;
|
||||
protected System.Web.UI.WebControls.Button searchUser_bt;
|
||||
protected System.Web.UI.WebControls.GridView Roles_gv;
|
||||
protected System.Web.UI.WebControls.ObjectDataSource ObjectDataSource1;
|
||||
protected Mainsoft.Web.AspnetConfig.Searcher srch;
|
||||
protected System.Web.UI.WebControls.HyperLink HyperLink1;
|
||||
protected System.Web.UI.WebControls.View quest;
|
||||
protected System.Web.UI.WebControls.Image Img;
|
||||
protected System.Web.UI.WebControls.Button yes;
|
||||
protected System.Web.UI.WebControls.Button no;
|
||||
}
|
||||
}
|
||||
@@ -1,301 +0,0 @@
|
||||
// Mainsoft.Web.AspnetConfig - Site AspnetConfig utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public class RolesDS
|
||||
{
|
||||
public static DataTable Select()
|
||||
{
|
||||
return CreateDataTable();
|
||||
}
|
||||
|
||||
public static DataTable SelectUser()
|
||||
{
|
||||
return CreateUserDataTable();
|
||||
}
|
||||
|
||||
public static DataTable SelectUser(string searchtag, string searchby)
|
||||
{
|
||||
return CreateUserDataTable(searchtag, searchby);
|
||||
}
|
||||
|
||||
public static DataTable SelectUsersRole(string user)
|
||||
{
|
||||
return CreateUsersRoles(user);
|
||||
}
|
||||
|
||||
public static DataTable CreateUsersRoles(string user)
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
|
||||
// Create User Name column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "Role";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "IsInRole";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
if (Roles.Enabled) {
|
||||
// Create rows to the table
|
||||
foreach (String role in Roles.GetAllRoles ()) {
|
||||
dtRow = aTable.NewRow ();
|
||||
dtRow["Role"] = role;
|
||||
dtRow["IsInRole"] = Roles.IsUserInRole (user, role);
|
||||
aTable.Rows.Add (dtRow);
|
||||
}
|
||||
}
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["Role"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable Delete(string Role)
|
||||
{
|
||||
if (Roles.RoleExists(Role))
|
||||
{
|
||||
Roles.DeleteRole(Role,false);
|
||||
}
|
||||
return Select();
|
||||
}
|
||||
|
||||
public static DataTable DeleteUser(string User)
|
||||
{
|
||||
Membership.DeleteUser(User, true);
|
||||
return SelectUser();
|
||||
}
|
||||
|
||||
public static DataTable CreateUserDataTable()
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
// Create User Name column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "User";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "Active";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
// Create rows to the table
|
||||
foreach (MembershipUser user in Membership.GetAllUsers())
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
dtRow["Active"] = user.IsApproved;
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["User"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable CreateUserDataTable(string searchtag, string searchby)
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "User";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "Active";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
string text = searchtag;
|
||||
text = text.Replace("*", "%");
|
||||
text = text.Replace("?", "_");
|
||||
|
||||
if (text.Trim() == "\"\"")
|
||||
text = "%";
|
||||
|
||||
if (searchby == "Name")
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByName(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
dtRow["Active"] = user.IsApproved;
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
else // Mail
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByEmail(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
dtRow["Active"] = user.IsApproved;
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["User"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable CreateDataTable()
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataRow dtRow;
|
||||
|
||||
// Create Name column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "Role";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.Caption = "Role Name";
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = false;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
if (Roles.Enabled) {
|
||||
// Create rows to the table
|
||||
foreach (string str in Roles.GetAllRoles ()) {
|
||||
dtRow = aTable.NewRow ();
|
||||
dtRow["Role"] = str;
|
||||
aTable.Rows.Add (dtRow);
|
||||
}
|
||||
}
|
||||
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["Role"] };
|
||||
return aTable;
|
||||
}
|
||||
|
||||
public static DataTable CreateManageRoleTable(string role, string searchtag, string searchby)
|
||||
{
|
||||
DataTable aTable = new DataTable("A");
|
||||
DataColumn dtCol;
|
||||
DataColumn dtCol1;
|
||||
DataRow dtRow;
|
||||
|
||||
// Create UserName column and add to the table
|
||||
dtCol = new DataColumn();
|
||||
dtCol.DataType = Type.GetType("System.String");
|
||||
dtCol.ColumnName = "User";
|
||||
dtCol.AutoIncrement = false;
|
||||
dtCol.Caption = "User Name";
|
||||
dtCol.ReadOnly = false;
|
||||
dtCol.Unique = true;
|
||||
aTable.Columns.Add(dtCol);
|
||||
|
||||
// Create User in role bool column and add to the table
|
||||
dtCol1 = new DataColumn();
|
||||
dtCol1.DataType = Type.GetType("System.Boolean");
|
||||
dtCol1.ColumnName = "InRole";
|
||||
dtCol1.AutoIncrement = false;
|
||||
dtCol1.Caption = "User Is In Role";
|
||||
dtCol1.ReadOnly = false;
|
||||
dtCol1.Unique = false;
|
||||
aTable.Columns.Add(dtCol1);
|
||||
|
||||
string text = searchtag;
|
||||
text = text.Replace("*", "%");
|
||||
text = text.Replace("?", "_");
|
||||
|
||||
if (text.Trim() == "\"\"")
|
||||
text = "%";
|
||||
|
||||
if (searchby == "Name")
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByName(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
if (Roles.Enabled) {
|
||||
dtRow["InRole"] = Roles.IsUserInRole (user.UserName, role);
|
||||
}
|
||||
else {
|
||||
dtRow["InRole"] = false;
|
||||
}
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
else // Mail
|
||||
{
|
||||
foreach (MembershipUser user in Membership.FindUsersByEmail(text))
|
||||
{
|
||||
dtRow = aTable.NewRow();
|
||||
dtRow["User"] = user.UserName;
|
||||
if (Roles.Enabled) {
|
||||
dtRow["InRole"] = Roles.IsUserInRole (user.UserName, role);
|
||||
}
|
||||
else {
|
||||
dtRow["InRole"] = false;
|
||||
}
|
||||
aTable.Rows.Add(dtRow);
|
||||
}
|
||||
}
|
||||
aTable.PrimaryKey = new DataColumn[] { aTable.Columns["User"] };
|
||||
return aTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Theme="" StylesheetTheme="" CodeBehind="SecurError.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.SecurError" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>ASP.Net Web Application Administration</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div style="font-weight: bold; font-size: 11pt;">
|
||||
By default, the Web Site Administration Tool may only be accessed locally.
|
||||
To enable accessing it from a remote computer, open the Web.config file, add the key <br />
|
||||
allowRemoteConfiguration to the appSettings section, and set its value to true: <br />
|
||||
<pre>
|
||||
< appSettings >
|
||||
</ add key="allowRemoteConfiguration" value="True" />
|
||||
</ appSettings >
|
||||
</pre>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class SecurError : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class SecurError {
|
||||
protected System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// System.Web.Util.StrUtils
|
||||
//
|
||||
// Author(s):
|
||||
// Gonzalo Paniagua Javier ([email protected])
|
||||
//
|
||||
// (C) 2005 Novell, Inc, (http://www.novell.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace Mainsoft.Web.Util
|
||||
{
|
||||
internal sealed class StrUtils {
|
||||
static CultureInfo invariant = CultureInfo.InvariantCulture;
|
||||
private StrUtils () { }
|
||||
|
||||
public static bool StartsWith (string str1, string str2)
|
||||
{
|
||||
return StartsWith (str1, str2, false);
|
||||
}
|
||||
|
||||
public static bool StartsWith (string str1, string str2, bool ignore_case)
|
||||
{
|
||||
int l2 = str2.Length;
|
||||
if (l2 == 0)
|
||||
return true;
|
||||
|
||||
int l1 = str1.Length;
|
||||
if (l2 > l1)
|
||||
return false;
|
||||
|
||||
return (0 == String.Compare (str1, 0, str2, 0, l2, ignore_case, invariant));
|
||||
}
|
||||
|
||||
public static bool EndsWith (string str1, string str2)
|
||||
{
|
||||
return EndsWith (str1, str2, false);
|
||||
}
|
||||
|
||||
public static bool EndsWith (string str1, string str2, bool ignore_case)
|
||||
{
|
||||
int l2 = str2.Length;
|
||||
if (l2 == 0)
|
||||
return true;
|
||||
|
||||
int l1 = str1.Length;
|
||||
if (l2 > l1)
|
||||
return false;
|
||||
|
||||
return (0 == String.Compare (str1, l1 - l2, str2, 0, l2, ignore_case, invariant));
|
||||
}
|
||||
|
||||
public static string EscapeQuotesAndBackslashes (string attributeValue)
|
||||
{
|
||||
StringBuilder sb = null;
|
||||
for (int i = 0; i < attributeValue.Length; i++) {
|
||||
char ch = attributeValue [i];
|
||||
if (ch == '\'' || ch == '"' || ch == '\\') {
|
||||
if (sb == null) {
|
||||
sb = new StringBuilder ();
|
||||
sb.Append (attributeValue.Substring (0, i));
|
||||
}
|
||||
sb.Append ('\\');
|
||||
sb.Append (ch);
|
||||
}
|
||||
else {
|
||||
if (sb != null)
|
||||
sb.Append (ch);
|
||||
}
|
||||
}
|
||||
if (sb != null)
|
||||
return sb.ToString ();
|
||||
return attributeValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
//
|
||||
// System.Web.UrlUtils.cs
|
||||
//
|
||||
// Authors:
|
||||
// Gonzalo Paniagua ([email protected])
|
||||
// Jackson Harper ([email protected])
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Web.SessionState;
|
||||
using System.Web;
|
||||
using System;
|
||||
|
||||
namespace Mainsoft.Web.Util {
|
||||
|
||||
internal class UrlUtils {
|
||||
|
||||
// appRoot + SessionID + vpath
|
||||
internal static string InsertSessionId (string id, string path)
|
||||
{
|
||||
string dir = GetDirectory (path);
|
||||
if (!dir.EndsWith ("/"))
|
||||
dir += "/";
|
||||
|
||||
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (!appvpath.EndsWith ("/"))
|
||||
appvpath += "/";
|
||||
|
||||
if (path.StartsWith (appvpath))
|
||||
path = path.Substring (appvpath.Length);
|
||||
|
||||
if (path [0] == '/')
|
||||
path = path.Length > 1 ? path.Substring (1) : "";
|
||||
|
||||
return Canonic (appvpath + "(" + id + ")/" + path);
|
||||
}
|
||||
#if false
|
||||
internal static string GetSessionId (string path)
|
||||
{
|
||||
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (path.Length <= appvpath.Length)
|
||||
return null;
|
||||
|
||||
path = path.Substring (appvpath.Length);
|
||||
if (path.Length == 0 || path [0] != '/')
|
||||
path = '/' + path;
|
||||
|
||||
int len = path.Length;
|
||||
if ((len < SessionId.IdLength + 3) || (path [1] != '(') ||
|
||||
(path [SessionId.IdLength + 2] != ')'))
|
||||
return null;
|
||||
|
||||
return path.Substring (2, SessionId.IdLength);
|
||||
}
|
||||
#endif
|
||||
internal static string RemoveSessionId (string base_path, string file_path)
|
||||
{
|
||||
// Caller did a GetSessionId first
|
||||
int idx = base_path.IndexOf ("/(");
|
||||
string dir = base_path.Substring (0, idx + 1);
|
||||
if (!dir.EndsWith ("/"))
|
||||
dir += "/";
|
||||
|
||||
idx = base_path.IndexOf (")/");
|
||||
if (idx != -1 && base_path.Length > idx + 2) {
|
||||
string dir2 = base_path.Substring (idx + 2);
|
||||
if (!dir2.EndsWith ("/"))
|
||||
dir2 += "/";
|
||||
|
||||
dir += dir2;
|
||||
}
|
||||
|
||||
return Canonic (dir + GetFile (file_path));
|
||||
}
|
||||
|
||||
public static string Combine (string basePath, string relPath)
|
||||
{
|
||||
if (relPath == null)
|
||||
throw new ArgumentNullException ("relPath");
|
||||
|
||||
int rlength = relPath.Length;
|
||||
if (rlength == 0)
|
||||
return "";
|
||||
|
||||
relPath = relPath.Replace ("\\", "/");
|
||||
if (IsRooted (relPath))
|
||||
return Canonic (relPath);
|
||||
|
||||
char first = relPath [0];
|
||||
if (rlength < 3 || first == '~' || first == '/' || first == '\\') {
|
||||
if (basePath == null || (basePath.Length == 1 && basePath [0] == '/'))
|
||||
basePath = String.Empty;
|
||||
|
||||
string slash = (first == '/') ? "" : "/";
|
||||
if (first == '~') {
|
||||
if (rlength == 1) {
|
||||
relPath = "";
|
||||
} else if (rlength > 1 && relPath [1] == '/') {
|
||||
relPath = relPath.Substring (2);
|
||||
slash = "/";
|
||||
}
|
||||
|
||||
string appvpath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (appvpath.EndsWith ("/"))
|
||||
slash = "";
|
||||
|
||||
return Canonic (appvpath + slash + relPath);
|
||||
}
|
||||
|
||||
return Canonic (basePath + slash + relPath);
|
||||
}
|
||||
|
||||
if (basePath == null || basePath == "" || basePath [0] == '~')
|
||||
basePath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
|
||||
if (basePath.Length <= 1)
|
||||
basePath = String.Empty;
|
||||
|
||||
return Canonic (basePath + "/" + relPath);
|
||||
}
|
||||
|
||||
static char [] path_sep = {'\\', '/'};
|
||||
|
||||
internal static string Canonic (string path)
|
||||
{
|
||||
string [] parts = path.Split (path_sep);
|
||||
int end = parts.Length;
|
||||
|
||||
int dest = 0;
|
||||
|
||||
for (int i = 0; i < end; i++) {
|
||||
string current = parts [i];
|
||||
if (current == "." )
|
||||
continue;
|
||||
|
||||
if (current == "..") {
|
||||
if (dest == 0) {
|
||||
if (i == 1) // see bug 52599
|
||||
continue;
|
||||
|
||||
throw new HttpException ("Invalid path.");
|
||||
}
|
||||
|
||||
dest --;
|
||||
continue;
|
||||
}
|
||||
|
||||
parts [dest++] = current;
|
||||
}
|
||||
|
||||
if (dest == 0)
|
||||
return "/";
|
||||
|
||||
return String.Join ("/", parts, 0, dest);
|
||||
}
|
||||
|
||||
internal static string GetDirectory (string url)
|
||||
{
|
||||
url = url.Replace('\\','/');
|
||||
int last = url.LastIndexOf ('/');
|
||||
|
||||
if (last > 0) {
|
||||
return RemoveDoubleSlashes (url.Substring (0, last));
|
||||
}
|
||||
|
||||
return "/";
|
||||
}
|
||||
|
||||
internal static string RemoveDoubleSlashes (string input)
|
||||
{
|
||||
// MS VirtualPathUtility removes duplicate '/'
|
||||
string str = input;
|
||||
string x;
|
||||
while ((x = str.Replace ("//", "/")) != str) {
|
||||
str = x;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
internal static string GetFile (string url)
|
||||
{
|
||||
url = url.Replace('\\','/');
|
||||
int last = url.LastIndexOf ('/');
|
||||
if (last >= 0) {
|
||||
if (url.Length == 1) // Empty file name instead of ArgumentOutOfRange
|
||||
return "";
|
||||
return url.Substring (last+1);
|
||||
}
|
||||
|
||||
throw new Exception (String.Format ("GetFile: `{0}' does not contain a /", url));
|
||||
}
|
||||
|
||||
internal static bool IsRooted (string path)
|
||||
{
|
||||
if (path == null || path == "")
|
||||
return true;
|
||||
|
||||
char c = path [0];
|
||||
if (c == '/' || c == '\\')
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static bool IsRelativeUrl (string path)
|
||||
{
|
||||
return (path [0] != '/' && path.IndexOf (':') == -1);
|
||||
}
|
||||
|
||||
public static string ResolveVirtualPathFromAppAbsolute (string path)
|
||||
{
|
||||
if (path [0] != '~') return path;
|
||||
|
||||
if (path.Length == 1)
|
||||
return HttpRuntime.AppDomainAppVirtualPath;
|
||||
|
||||
if (path [1] == '/' || path [1] == '\\') {
|
||||
string appPath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (appPath.Length > 1)
|
||||
return appPath + "/" + path.Substring (2);
|
||||
return "/" + path.Substring (2);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
public static string ResolvePhysicalPathFromAppAbsolute (string path)
|
||||
{
|
||||
if (path [0] != '~') return path;
|
||||
|
||||
if (path.Length == 1)
|
||||
return HttpRuntime.AppDomainAppPath;
|
||||
|
||||
if (path [1] == '/' || path [1] == '\\') {
|
||||
string appPath = HttpRuntime.AppDomainAppPath;
|
||||
if (appPath.Length > 1)
|
||||
return appPath + "/" + path.Substring (2);
|
||||
return "/" + path.Substring (2);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
<%--
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// Authors:
|
||||
// Klain Yoni <[email protected]>
|
||||
//
|
||||
// Mainsoft.Web.AspnetConfig - Site administration utility
|
||||
// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
|
||||
<%@ Master Language="C#" AutoEventWireup="true" EnableTheming="false" CodeBehind="Util.master.cs" Inherits="Mainsoft.Web.AspnetConfig.Util" %>
|
||||
<%@ Register TagPrefix="Custom" Namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head id="Head1" runat="server">
|
||||
<link href="<%= Page.ClientScript.GetWebResourceUrl (typeof(Util), "Mainsoft.Web.AspnetConfig.aspnetconfig.Mainsoft.Web.AspnetConfig.css") %>" rel="stylesheet" type="text/css" />
|
||||
<title>ASP.Net Web Application Administration</title>
|
||||
<style type="text/css">
|
||||
A.SiteMap:visited { color: #507CD1; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="h1">
|
||||
Web Site Administration Tool
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="bordredtable">
|
||||
<tr style="background-color:">
|
||||
<td style="background-color: lightblue">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>Current page : </td>
|
||||
<td style="font-family: Verdana; font-size: 0.8em; color: #507CD1; font-weight:bold;">
|
||||
<table>
|
||||
<tr>
|
||||
<asp:ContentPlaceHolder ID="SiteMapLinks" runat="server"></asp:ContentPlaceHolder>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<asp:ContentPlaceHolder ID="Main" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<asp:Button ID="Back" runat="server" Text="Back" />
|
||||
<%--style="padding-right: 1px; padding-left: 1px; font-weight: bold; padding-bottom: 1px; margin: 1px; color: yellow; padding-top: 1px; background-color: #6699ff"--%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Resources;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig
|
||||
{
|
||||
public partial class Util : System.Web.UI.MasterPage
|
||||
{
|
||||
bool allowRemoteConfiguration // Default is false
|
||||
{
|
||||
get
|
||||
{
|
||||
if (System.Configuration.ConfigurationSettings.AppSettings["allowRemoteConfiguration"] != null) {
|
||||
return bool.Parse (System.Configuration.ConfigurationSettings.AppSettings["allowRemoteConfiguration"]);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String Backurl
|
||||
{
|
||||
get { return ViewState["BackUrl"] == null ? String.Empty : (string) ViewState["BackUrl"]; }
|
||||
set { ViewState["BackUrl"] = value; }
|
||||
}
|
||||
|
||||
protected override void OnInit (EventArgs e)
|
||||
{
|
||||
if (!(allowRemoteConfiguration || Request.IsLocal)) {
|
||||
Server.Transfer ("~/aspnetconfig/SecurError.aspx");
|
||||
}
|
||||
|
||||
|
||||
base.OnInit (e);
|
||||
}
|
||||
|
||||
protected void Page_Load (object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Mainsoft.Web.AspnetConfig {
|
||||
|
||||
public partial class Util {
|
||||
protected System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
protected System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
protected System.Web.UI.WebControls.ContentPlaceHolder SiteMapLinks;
|
||||
protected System.Web.UI.WebControls.ContentPlaceHolder Main;
|
||||
protected System.Web.UI.WebControls.Button Back;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<!--Minimalistic buildfile -->
|
||||
<project name="Mainsoft.Web.AspnetConfig" default="all">
|
||||
<property name="ghroot" value="${project::get-base-directory()}\..\..\..\..\.."/>
|
||||
<!--Allways at the beginning-->
|
||||
<include buildfile="${ghroot}\vsbuild\properties.xml" />
|
||||
|
||||
<!--MANDATORY SECTION-->
|
||||
|
||||
<!--Could be GH ANT .NET-->
|
||||
<property name="projecttype" value=".NET2005"/>
|
||||
<!--Could be RUNTIME TOOLS ... -->
|
||||
<property name="rules" value="RUNTIME"/>
|
||||
|
||||
<property name="msbuild_file" value="Mainsoft.Web.AspnetConfig.csproj"/>
|
||||
|
||||
<!--Fileset describing project output files. Uset by copy/delete rules in framework-->
|
||||
<fileset id="output" basedir="${project::get-base-directory()}\bin" failonempty="true">
|
||||
<include name="Mainsoft.Web.AspnetConfig.jar"/>
|
||||
<include name="Mainsoft.Web.AspnetConfig.dll"/>
|
||||
</fileset>
|
||||
|
||||
<!--END MANDATORY SECTION-->
|
||||
|
||||
<!--OPTIONAL SECTION-->
|
||||
<!--
|
||||
<target name="postbuild">
|
||||
|
||||
</target>
|
||||
-->
|
||||
<!--
|
||||
<property name="cvnsrc" value="svn://svn.myrealbox.com/source/trunk/mcs/<cvn_folder>"/>
|
||||
<target name="prebuild">
|
||||
Put something there if you need
|
||||
</target>
|
||||
-->
|
||||
<!--END OPTIONAL SECTION-->
|
||||
|
||||
|
||||
<!--Allways at the end-->
|
||||
<include buildfile="${ghroot}\vsbuild\framework.xml" />
|
||||
</project>
|
||||
Whitespace-only changes.
Binary file not shown.
|
Before Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -1,19 +0,0 @@
|
||||
/AbstractAttributeMap.cs -crlf
|
||||
/AspNetFacesContext.cs -crlf
|
||||
/BaseExternalContext.cs -crlf
|
||||
/BaseFacesPageHandlerFactory.cs -crlf
|
||||
/BaseFacesStateManager.cs -crlf
|
||||
/BaseFacesViewHandler.cs -crlf
|
||||
/ChangeLog -crlf
|
||||
/IExtendedViewHandler.cs -crlf
|
||||
/OutputStreamWrapper.cs -crlf
|
||||
/RequestParameterMap.cs -crlf
|
||||
/RequestParameterValuesMap.cs -crlf
|
||||
/ServletFacesContext.cs -crlf
|
||||
/ServletFacesPageHandler.cs -crlf
|
||||
/ServletFacesPageHandlerFactory.cs -crlf
|
||||
/ServletFacesStateManager.cs -crlf
|
||||
/ServletFacesViewHandler.cs -crlf
|
||||
/ServletIncludeUtils.cs -crlf
|
||||
/ServletResourceLoader.cs -crlf
|
||||
/SessionWrapper.cs -crlf
|
||||
@@ -1,333 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.AbstractAttributeMap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using java.util;
|
||||
using System;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
partial class BaseExternalContext
|
||||
{
|
||||
public abstract class AbstractAttributeMap : AbstractMap
|
||||
{
|
||||
private Set _keySet;
|
||||
private Collection _values;
|
||||
private Set _entrySet;
|
||||
|
||||
public override void clear () {
|
||||
List names = new ArrayList ();
|
||||
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
|
||||
names.add (e.nextElement ());
|
||||
}
|
||||
|
||||
for (Iterator it = names.iterator (); it.hasNext (); ) {
|
||||
removeAttribute ((String) it.next ());
|
||||
}
|
||||
}
|
||||
|
||||
public override bool containsKey (Object key) {
|
||||
return getAttribute (key.ToString ()) != null;
|
||||
}
|
||||
|
||||
public override bool containsValue (Object findValue) {
|
||||
if (findValue == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
|
||||
Object value = getAttribute ((String) e.nextElement ());
|
||||
if (findValue.Equals (value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Set entrySet () {
|
||||
return (_entrySet != null) ? _entrySet : (_entrySet = new EntrySet (this));
|
||||
}
|
||||
|
||||
public override Object get (Object key) {
|
||||
return getAttribute (key.ToString ());
|
||||
}
|
||||
|
||||
public override bool isEmpty () {
|
||||
return !getAttributeNames ().hasMoreElements ();
|
||||
}
|
||||
|
||||
public override Set keySet () {
|
||||
return (_keySet != null) ? _keySet : (_keySet = new KeySet (this));
|
||||
}
|
||||
|
||||
public override Object put (Object key, Object value) {
|
||||
String key_ = key.ToString ();
|
||||
Object retval = getAttribute (key_);
|
||||
setAttribute (key_, value);
|
||||
return retval;
|
||||
}
|
||||
|
||||
public override void putAll (Map t) {
|
||||
for (Iterator it = t.entrySet ().iterator (); it.hasNext (); ) {
|
||||
Map.Entry entry = (Map.Entry) it.next ();
|
||||
setAttribute (entry.getKey ().ToString (), entry.getValue ());
|
||||
}
|
||||
}
|
||||
|
||||
public override Object remove (Object key) {
|
||||
String key_ = key.ToString ();
|
||||
Object retval = getAttribute (key_);
|
||||
removeAttribute (key_);
|
||||
return retval;
|
||||
}
|
||||
|
||||
public override int size () {
|
||||
int size = 0;
|
||||
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
|
||||
size++;
|
||||
e.nextElement ();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
public override Collection values () {
|
||||
return (_values != null) ? _values : (_values = new Values (this));
|
||||
}
|
||||
|
||||
|
||||
abstract protected Object getAttribute (string key);
|
||||
|
||||
abstract protected void setAttribute (string key, Object value);
|
||||
|
||||
abstract protected void removeAttribute (string key);
|
||||
|
||||
abstract protected Enumeration getAttributeNames ();
|
||||
|
||||
|
||||
private class KeySet : AbstractSet
|
||||
{
|
||||
protected readonly AbstractAttributeMap _owner;
|
||||
public KeySet (AbstractAttributeMap owner) {
|
||||
_owner = owner;
|
||||
}
|
||||
|
||||
public override Iterator iterator () {
|
||||
return new KeyIterator (_owner);
|
||||
}
|
||||
|
||||
public override bool isEmpty () {
|
||||
return _owner.isEmpty ();
|
||||
}
|
||||
|
||||
public override int size () {
|
||||
return _owner.size ();
|
||||
}
|
||||
|
||||
public override bool contains (Object o) {
|
||||
return _owner.containsKey (o);
|
||||
}
|
||||
|
||||
public override bool remove (Object o) {
|
||||
return _owner.remove (o) != null;
|
||||
}
|
||||
|
||||
public override void clear () {
|
||||
_owner.clear ();
|
||||
}
|
||||
}
|
||||
|
||||
private class KeyIterator : Iterator
|
||||
{
|
||||
protected readonly AbstractAttributeMap _owner;
|
||||
protected readonly Enumeration _e;
|
||||
|
||||
public KeyIterator (AbstractAttributeMap owner) {
|
||||
_owner = owner;
|
||||
_e = _owner.getAttributeNames ();
|
||||
}
|
||||
|
||||
protected Object _currentKey;
|
||||
|
||||
public virtual void remove () {
|
||||
// remove() may cause ConcurrentModificationException.
|
||||
// We could throw an exception here, but not throwing an exception
|
||||
// allows one call to remove() to succeed
|
||||
if (_currentKey == null) {
|
||||
throw new NoSuchElementException (
|
||||
"You must call next() at least once");
|
||||
}
|
||||
_owner.remove (_currentKey);
|
||||
}
|
||||
|
||||
public bool hasNext () {
|
||||
return _e.hasMoreElements ();
|
||||
}
|
||||
|
||||
public virtual Object next () {
|
||||
return _currentKey = _e.nextElement ();
|
||||
}
|
||||
}
|
||||
|
||||
private class Values : KeySet
|
||||
{
|
||||
|
||||
public Values (AbstractAttributeMap owner)
|
||||
: base (owner) {
|
||||
}
|
||||
|
||||
public override Iterator iterator () {
|
||||
return new ValuesIterator (_owner);
|
||||
}
|
||||
|
||||
public override bool contains (Object o) {
|
||||
return _owner.containsValue (o);
|
||||
}
|
||||
|
||||
public override bool remove (Object o) {
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Iterator it = iterator (); it.hasNext (); ) {
|
||||
if (o.Equals (it.next ())) {
|
||||
it.remove ();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private class ValuesIterator : KeyIterator
|
||||
{
|
||||
public ValuesIterator (AbstractAttributeMap owner)
|
||||
: base (owner) { }
|
||||
public override Object next () {
|
||||
base.next ();
|
||||
return _owner.get (_currentKey);
|
||||
}
|
||||
}
|
||||
|
||||
private class EntrySet : KeySet
|
||||
{
|
||||
public EntrySet (AbstractAttributeMap owner) : base (owner) { }
|
||||
|
||||
public override Iterator iterator () {
|
||||
return new EntryIterator (_owner);
|
||||
}
|
||||
|
||||
public override bool contains (Object o) {
|
||||
if (!(o is Map.Entry)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Map.Entry entry = (Map.Entry) o;
|
||||
Object key = entry.getKey ();
|
||||
Object value = entry.getValue ();
|
||||
if (key == null || value == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return value.Equals (_owner.get (key));
|
||||
}
|
||||
|
||||
public override bool remove (Object o) {
|
||||
if (!(o is Map.Entry)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Map.Entry entry = (Map.Entry) o;
|
||||
Object key = entry.getKey ();
|
||||
Object value = entry.getValue ();
|
||||
if (key == null || value == null
|
||||
|| !value.Equals (_owner.get (key))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return _owner.remove (((Map.Entry) o).getKey ()) != null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Not very efficient since it generates a new instance of <code>Entry</code>
|
||||
* for each element and still internaly uses the <code>KeyIterator</code>.
|
||||
* It is more efficient to use the <code>KeyIterator</code> directly.
|
||||
*/
|
||||
private class EntryIterator : KeyIterator
|
||||
{
|
||||
public EntryIterator (AbstractAttributeMap owner) : base (owner) { }
|
||||
public override Object next () {
|
||||
base.next ();
|
||||
// Must create new Entry every time--value of the entry must stay
|
||||
// linked to the same attribute name
|
||||
return new EntrySetEntry (_currentKey);
|
||||
}
|
||||
}
|
||||
|
||||
private class EntrySetEntry : Map.Entry
|
||||
{
|
||||
readonly AbstractAttributeMap _owner;
|
||||
|
||||
public EntrySetEntry (AbstractAttributeMap owner) {
|
||||
_owner = owner;
|
||||
}
|
||||
|
||||
private readonly Object _currentKey;
|
||||
|
||||
public EntrySetEntry (Object currentKey) {
|
||||
_currentKey = currentKey;
|
||||
}
|
||||
|
||||
public Object getKey () {
|
||||
return _currentKey;
|
||||
}
|
||||
|
||||
public Object getValue () {
|
||||
return _owner.get (_currentKey);
|
||||
}
|
||||
|
||||
public Object setValue (Object value) {
|
||||
return _owner.put (_currentKey, value);
|
||||
}
|
||||
|
||||
public int hashCode () {
|
||||
return _currentKey == null ? 0 : _currentKey.GetHashCode ();
|
||||
}
|
||||
|
||||
public bool equals (Object obj) {
|
||||
if (!(obj is EntrySetEntry))
|
||||
return false;
|
||||
return _currentKey != null && _currentKey.Equals (obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using javax.servlet;
|
||||
using javax.faces.lifecycle;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class AspNetFacesContext : FacesContext
|
||||
{
|
||||
readonly FacesContext _oldFacesContex;
|
||||
readonly FacesContext _facesContex;
|
||||
readonly HttpContext _httpContext;
|
||||
readonly ExternalContext _externalContext;
|
||||
|
||||
public HttpContext Context {
|
||||
get { return _httpContext; }
|
||||
}
|
||||
|
||||
protected AspNetFacesContext (FacesContext wrappedFacesContex, ExternalContext externalContext, HttpContext httpContext, FacesContext oldFacesContex) {
|
||||
_facesContex = wrappedFacesContex;
|
||||
_httpContext = httpContext;
|
||||
_oldFacesContex = oldFacesContex;
|
||||
_externalContext = externalContext;
|
||||
setCurrentInstance (this);
|
||||
}
|
||||
|
||||
public bool IsProcessingInclude () {
|
||||
if (_oldFacesContex == null)
|
||||
return false;
|
||||
|
||||
if (getViewRoot ().getChildCount () == 0)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
Page page = (Page) getViewRoot ().getChildren ().get (0);
|
||||
return !page.IsPostBack;
|
||||
}
|
||||
|
||||
public override void addMessage (string __p1, javax.faces.application.FacesMessage __p2) {
|
||||
_facesContex.addMessage (__p1, __p2);
|
||||
}
|
||||
|
||||
public override javax.faces.application.Application getApplication () {
|
||||
return _facesContex.getApplication ();
|
||||
}
|
||||
|
||||
public override java.util.Iterator getClientIdsWithMessages () {
|
||||
return _facesContex.getClientIdsWithMessages ();
|
||||
}
|
||||
|
||||
public override ExternalContext getExternalContext () {
|
||||
return _externalContext;
|
||||
}
|
||||
|
||||
public override javax.faces.application.FacesMessage.Severity getMaximumSeverity () {
|
||||
return _facesContex.getMaximumSeverity ();
|
||||
}
|
||||
|
||||
public override java.util.Iterator getMessages (string __p1) {
|
||||
return _facesContex.getMessages (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Iterator getMessages () {
|
||||
return _facesContex.getMessages ();
|
||||
}
|
||||
|
||||
public override javax.faces.render.RenderKit getRenderKit () {
|
||||
return _facesContex.getRenderKit ();
|
||||
}
|
||||
|
||||
public override bool getRenderResponse () {
|
||||
return _facesContex.getRenderResponse ();
|
||||
}
|
||||
|
||||
public override bool getResponseComplete () {
|
||||
return _facesContex.getResponseComplete ();
|
||||
}
|
||||
|
||||
public override ResponseStream getResponseStream () {
|
||||
return _facesContex.getResponseStream ();
|
||||
}
|
||||
|
||||
public override ResponseWriter getResponseWriter () {
|
||||
return _facesContex.getResponseWriter ();
|
||||
}
|
||||
|
||||
public override javax.faces.component.UIViewRoot getViewRoot () {
|
||||
return _facesContex.getViewRoot ();
|
||||
}
|
||||
|
||||
public override void release () {
|
||||
_facesContex.release ();
|
||||
FacesContext.setCurrentInstance (_oldFacesContex);
|
||||
}
|
||||
|
||||
public override void renderResponse () {
|
||||
_facesContex.renderResponse ();
|
||||
}
|
||||
|
||||
public override void responseComplete () {
|
||||
_facesContex.responseComplete ();
|
||||
}
|
||||
|
||||
public override void setResponseStream (ResponseStream __p1) {
|
||||
_facesContex.setResponseStream (__p1);
|
||||
}
|
||||
|
||||
public override void setResponseWriter (ResponseWriter __p1) {
|
||||
_facesContex.setResponseWriter (__p1);
|
||||
}
|
||||
|
||||
public override void setViewRoot (javax.faces.component.UIViewRoot __p1) {
|
||||
_facesContex.setViewRoot (__p1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.BaseExternalContext.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
using System.Web;
|
||||
using java.util;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract partial class BaseExternalContext : ExternalContext
|
||||
{
|
||||
readonly HttpContext _httpContext;
|
||||
readonly string _executionFilePath;
|
||||
|
||||
private Map _requestParameterMap;
|
||||
private Map _requestParameterValuesMap;
|
||||
|
||||
protected BaseExternalContext (HttpContext httpContext, string executionFilePath) {
|
||||
_httpContext = httpContext;
|
||||
_executionFilePath = executionFilePath;
|
||||
}
|
||||
|
||||
protected HttpContext Context {
|
||||
get { return _httpContext; }
|
||||
}
|
||||
|
||||
public override Map getRequestParameterMap () {
|
||||
return _requestParameterMap ?? (_requestParameterMap = new RequestParameterMap (Context.Request.Form));
|
||||
}
|
||||
|
||||
public override Iterator getRequestParameterNames () {
|
||||
return new IEnumeratorIteratorImpl (Context.Request.Form.Keys.GetEnumerator ());
|
||||
}
|
||||
|
||||
public override Map getRequestParameterValuesMap () {
|
||||
return _requestParameterValuesMap ?? (_requestParameterValuesMap = new RequestParameterValuesMap (Context.Request.Form));
|
||||
}
|
||||
|
||||
public override string getRequestPathInfo () {
|
||||
return _executionFilePath.Substring (getRequestContextPath ().Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
// Author: Igor Zelmanovich <[email protected]>
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.servlet;
|
||||
using javax.faces;
|
||||
using javax.faces.webapp;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesPageHandlerFactory : IHttpHandlerFactory
|
||||
{
|
||||
public abstract IHttpHandler GetHandler (HttpContext context, string requestType, string url, string pathTranslated);
|
||||
|
||||
public virtual void ReleaseHandler (IHttpHandler handler) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.application;
|
||||
using javax.faces.component;
|
||||
using javax.faces.context;
|
||||
using System.Diagnostics;
|
||||
using System.Web.UI;
|
||||
using javax.faces.render;
|
||||
using javax.faces;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesStateManager : StateManager
|
||||
{
|
||||
protected static readonly string VIEWSTATE = "__VIEWSTATE";
|
||||
protected static readonly RenderKitFactory RenderKitFactory = (RenderKitFactory) FactoryFinder.getFactory (FactoryFinder.RENDER_KIT_FACTORY);
|
||||
|
||||
public override StateManager.SerializedView saveSerializedView (FacesContext facesContext) {
|
||||
Object treeStruct = getTreeStructureToSave (facesContext);
|
||||
Object compStates = getComponentStateToSave (facesContext);
|
||||
SerializedView serializedView = new SerializedView (this, treeStruct, compStates);
|
||||
return serializedView;
|
||||
}
|
||||
|
||||
protected override sealed Object getTreeStructureToSave (FacesContext facesContext) {
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
public override UIViewRoot restoreView (FacesContext facesContext,
|
||||
String viewId,
|
||||
String renderKitId) {
|
||||
|
||||
UIViewRoot uiViewRoot = restoreTreeStructure (facesContext, viewId, renderKitId);
|
||||
Page page = (Page) uiViewRoot.getChildren ().get (0);
|
||||
if (page.IsPostBack || page.IsCallback)
|
||||
restoreComponentState (facesContext, uiViewRoot, renderKitId);
|
||||
else
|
||||
facesContext.renderResponse ();
|
||||
return uiViewRoot;
|
||||
}
|
||||
|
||||
protected override sealed UIViewRoot restoreTreeStructure (FacesContext facesContext, string viewId, string renderKitId) {
|
||||
return facesContext.getApplication ().getViewHandler ().createView (facesContext, viewId);
|
||||
}
|
||||
|
||||
protected override Object getComponentStateToSave (FacesContext facesContext) {
|
||||
Trace.WriteLine ("Entering getComponentStateToSave");
|
||||
|
||||
UIViewRoot viewRoot = facesContext.getViewRoot ();
|
||||
if (viewRoot.isTransient ()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Object serializedComponentStates = ((UIComponent) viewRoot.getChildren ().get (0)).processSaveState (facesContext);
|
||||
//Locale is a state attribute of UIViewRoot and need not be saved explicitly
|
||||
Trace.WriteLine ("Exiting getComponentStateToSave");
|
||||
return serializedComponentStates;
|
||||
}
|
||||
|
||||
protected void SaveStateInClient (FacesContext facesContext, StateManager.SerializedView serializedView) {
|
||||
//UIViewRoot uiViewRoot = facesContext.getViewRoot ();
|
||||
////save state in response (client-side: full state; server-side: sequence)
|
||||
//RenderKit renderKit = RenderKitFactory.getRenderKit (facesContext, uiViewRoot.getRenderKitId ());
|
||||
//// not us.
|
||||
//renderKit.getResponseStateManager ().writeState (facesContext, serializedView);
|
||||
|
||||
java.io.ByteArrayOutputStream bytearrayoutputstream = new java.io.ByteArrayOutputStream ();
|
||||
java.io.ObjectOutputStream objectoutputstream = new java.io.ObjectOutputStream (bytearrayoutputstream);
|
||||
|
||||
//ignore tree structure
|
||||
//objectoutputstream.writeObject (serializedView.getStructure ());
|
||||
objectoutputstream.writeObject (serializedView.getState ());
|
||||
objectoutputstream.close ();
|
||||
bytearrayoutputstream.close ();
|
||||
|
||||
string s =
|
||||
@"<div>
|
||||
<input type=""hidden"" name=""" + VIEWSTATE + "\" id=\"" + VIEWSTATE + "\" value=\"" +
|
||||
Convert.ToBase64String ((byte []) vmw.common.TypeUtils.ToByteArray (bytearrayoutputstream.toByteArray ())) + @""" />
|
||||
</div>";
|
||||
facesContext.getResponseWriter ().write (s);
|
||||
}
|
||||
|
||||
protected object GetStateFromClient (FacesContext facesContext, String viewId, String renderKitId) {
|
||||
//RenderKit renderKit = RenderKitFactory.getRenderKit (facesContext, renderKitId);
|
||||
//ResponseStateManager responseStateManager = renderKit.getResponseStateManager ();
|
||||
//responseStateManager.getTreeStructureToRestore (facesContext, viewId); //ignore result. Must call for compatibility with sun implementation.
|
||||
//return responseStateManager.getComponentStateToRestore (facesContext);
|
||||
|
||||
java.util.Map map = facesContext.getExternalContext ().getRequestParameterMap ();
|
||||
string s1 = (string) map.get (VIEWSTATE);
|
||||
|
||||
byte [] buffer = Convert.FromBase64String (s1);
|
||||
java.io.ByteArrayInputStream bytearrayinputstream = new java.io.ByteArrayInputStream (vmw.common.TypeUtils.ToSByteArray (buffer));
|
||||
java.io.ObjectInputStream inputStream = new java.io.ObjectInputStream (bytearrayinputstream);
|
||||
//ignore tree structure
|
||||
//inputStream.readObject ();
|
||||
object state = inputStream.readObject ();
|
||||
inputStream.close ();
|
||||
bytearrayinputstream.close ();
|
||||
|
||||
return state;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.application;
|
||||
using java.util;
|
||||
using javax.faces.context;
|
||||
using javax.faces.component;
|
||||
using javax.faces.render;
|
||||
using System.Web.UI;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesViewHandler : ViewHandler, IExtendedViewHandler
|
||||
{
|
||||
readonly ViewHandler _viewHandler;
|
||||
public static readonly string NAMESPACE = "__NAMESPACE";
|
||||
|
||||
public BaseFacesViewHandler (ViewHandler viewHandler) {
|
||||
_viewHandler = viewHandler;
|
||||
}
|
||||
|
||||
public override string getActionURL (FacesContext facesContext, string viewId) {
|
||||
return _viewHandler.getActionURL (facesContext, viewId);
|
||||
}
|
||||
|
||||
public override Locale calculateLocale (FacesContext facesContext) {
|
||||
return _viewHandler.calculateLocale (facesContext);
|
||||
}
|
||||
|
||||
public override String calculateRenderKitId (FacesContext facesContext) {
|
||||
return _viewHandler.calculateRenderKitId (facesContext);
|
||||
}
|
||||
|
||||
public override UIViewRoot createView (FacesContext facesContext, String viewId) {
|
||||
|
||||
// create instance of Page by viewId
|
||||
StringBuilder sb = new StringBuilder ();
|
||||
sb.Append (facesContext.getExternalContext ().getRequestContextPath ());
|
||||
sb.Append (viewId);
|
||||
IHttpHandler page = PageParser.GetCompiledPageInstance (sb.ToString (), null, ((AspNetFacesContext) facesContext).Context);
|
||||
|
||||
HttpContext context = ((AspNetFacesContext) facesContext).Context;
|
||||
page.ProcessRequest (context);
|
||||
|
||||
UIViewRoot uiViewRoot = _viewHandler.createView (facesContext, viewId);
|
||||
uiViewRoot.getChildren ().add (0, (UIComponent) page);
|
||||
|
||||
Trace.WriteLine ("Created view " + viewId);
|
||||
return uiViewRoot;
|
||||
}
|
||||
|
||||
public override String getResourceURL (FacesContext facesContext, String path) {
|
||||
return _viewHandler.getResourceURL (facesContext, path);
|
||||
}
|
||||
|
||||
public override void renderView (FacesContext facesContext, UIViewRoot viewToRender) {
|
||||
if (viewToRender == null)
|
||||
throw new ArgumentNullException ("viewToRender", "viewToRender must not be null");
|
||||
((UIComponent) viewToRender.getChildren ().get (0)).encodeChildren (facesContext);
|
||||
}
|
||||
|
||||
|
||||
public override UIViewRoot restoreView (FacesContext facesContext, String viewId) {
|
||||
return _viewHandler.restoreView (facesContext, viewId);
|
||||
}
|
||||
|
||||
public override void writeState (FacesContext facesContext) {
|
||||
StateManager manager = facesContext.getApplication ().getStateManager ();
|
||||
StateManager.SerializedView serializedView = manager.saveSerializedView (facesContext);
|
||||
manager.writeState (facesContext, serializedView);
|
||||
}
|
||||
|
||||
public virtual string EncodeNamespace (FacesContext facesContext, string value) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,396 +0,0 @@
|
||||
//
|
||||
// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Threading;
|
||||
using System.Web.Hosting;
|
||||
using System.IO;
|
||||
|
||||
using javax.servlet;
|
||||
using javax.servlet.http;
|
||||
using vmw.common;
|
||||
using java.util;
|
||||
using vmw.@internal;
|
||||
using java.lang.reflect;
|
||||
using java.net;
|
||||
using System.Globalization;
|
||||
using System.Diagnostics;
|
||||
using javax.faces;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.faces.webapp;
|
||||
using javax.faces.render;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public interface IJDBCDriverDeregisterer
|
||||
{
|
||||
void DeregisterDriver (java.sql.Driver driver);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseHttpServlet : HttpServlet, IJDBCDriverDeregisterer
|
||||
{
|
||||
bool _appVirDirInited = false;
|
||||
|
||||
static FacesContextFactory _facesContextFactory;
|
||||
static Lifecycle _lifecycle;
|
||||
static RenderKitFactory _renderKitFactory;
|
||||
|
||||
public BaseHttpServlet()
|
||||
{
|
||||
}
|
||||
|
||||
public static RenderKitFactory RenderKitFactory {
|
||||
get { return _renderKitFactory; }
|
||||
}
|
||||
|
||||
public static FacesContextFactory FacesContextFactory {
|
||||
get { return _facesContextFactory; }
|
||||
}
|
||||
|
||||
public static Lifecycle Lifecycle {
|
||||
get { return _lifecycle; }
|
||||
}
|
||||
|
||||
override public void init(ServletConfig config)
|
||||
{
|
||||
base.init(config);
|
||||
InitRuntime (config, this);
|
||||
}
|
||||
|
||||
public static void InitRuntime (ServletConfig config, object evidence) {
|
||||
|
||||
ServletContext context = config.getServletContext ();
|
||||
|
||||
if (context.getAttribute (J2EEConsts.APP_DOMAIN) != null)
|
||||
return;
|
||||
|
||||
_facesContextFactory = (FacesContextFactory) FactoryFinder.getFactory (FactoryFinder.FACES_CONTEXT_FACTORY);
|
||||
//TODO: null-check for Weblogic, that tries to initialize Servlet before ContextListener
|
||||
|
||||
//Javadoc says: Lifecycle instance is shared across multiple simultaneous requests, it must be implemented in a thread-safe manner.
|
||||
//So we can acquire it here once:
|
||||
LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory (FactoryFinder.LIFECYCLE_FACTORY);
|
||||
_lifecycle = lifecycleFactory.getLifecycle (context.getInitParameter (FacesServlet.LIFECYCLE_ID_ATTR) ?? LifecycleFactory.DEFAULT_LIFECYCLE);
|
||||
|
||||
_renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory (FactoryFinder.RENDER_KIT_FACTORY);
|
||||
|
||||
AppDomain servletDomain = createServletDomain (config);
|
||||
vmw.@internal.EnvironmentUtils.setAppDomain (servletDomain);
|
||||
|
||||
try {
|
||||
//GH Infromation Initizalization
|
||||
long currentTime = java.lang.System.currentTimeMillis ();
|
||||
servletDomain.SetData (".domainId", currentTime.ToString ("x"));
|
||||
currentTime = ~currentTime;
|
||||
servletDomain.SetData (".appId", currentTime.ToString ("x"));
|
||||
servletDomain.SetData (".appName", servletDomain.SetupInformation.ApplicationName);
|
||||
|
||||
servletDomain.SetData (J2EEConsts.CLASS_LOADER, java.lang.Thread.currentThread ().getContextClassLoader ());
|
||||
//servletDomain.SetData (J2EEConsts.CLASS_LOADER, vmw.common.TypeUtils.ToClass (evidence).getClassLoader ());
|
||||
//servletDomain.SetData(J2EEConsts.SERVLET_CONFIG, config);
|
||||
servletDomain.SetData (J2EEConsts.RESOURCE_LOADER, new ServletResourceLoader (context));
|
||||
|
||||
lock (evidence) {
|
||||
if (context.getAttribute (J2EEConsts.APP_DOMAIN) == null)
|
||||
context.setAttribute (J2EEConsts.APP_DOMAIN, servletDomain);
|
||||
}
|
||||
//config.getServletContext ().setAttribute (J2EEConsts.CURRENT_SERVLET, this);
|
||||
}
|
||||
finally {
|
||||
vmw.@internal.EnvironmentUtils.cleanTLS ();
|
||||
vmw.@internal.EnvironmentUtils.clearAppDomain ();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void service (HttpServletRequest req, HttpServletResponse resp)
|
||||
{
|
||||
const string assemblies = "/assemblies";
|
||||
const string getping = "getping";
|
||||
const string setping = "setping";
|
||||
const string version = "2.2";
|
||||
string servletPath = req.getServletPath ();
|
||||
|
||||
if (String.CompareOrdinal (assemblies, 0, servletPath, 0, assemblies.Length) == 0) {
|
||||
if (servletPath.Length == assemblies.Length ||
|
||||
servletPath [assemblies.Length] == '/') {
|
||||
string requestURI = req.getRequestURI ();
|
||||
bool getp = requestURI.EndsWith (getping, StringComparison.Ordinal);
|
||||
if (!getp && requestURI.EndsWith (setping, StringComparison.Ordinal)) {
|
||||
getServletContext().setAttribute(getping, version);
|
||||
getp = true;
|
||||
}
|
||||
|
||||
if (getp) {
|
||||
string ping = (string) getServletContext ().getAttribute (getping);
|
||||
if (ping == null)
|
||||
ping = "0";
|
||||
resp.getOutputStream ().print (ping);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
resp.setContentType ("text/html");
|
||||
|
||||
try
|
||||
{
|
||||
// Very important - to update Virtual Path!!!
|
||||
AppDomain servletDomain = (AppDomain)this.getServletContext().getAttribute(J2EEConsts.APP_DOMAIN);
|
||||
if (!_appVirDirInited) {
|
||||
string appVPath = req.getContextPath ();
|
||||
if (appVPath == null || appVPath.Length == 0)
|
||||
appVPath = "/";
|
||||
servletDomain.SetData (IAppDomainConfig.APP_VIRT_DIR, appVPath);
|
||||
servletDomain.SetData (".hostingVirtualPath", req.getContextPath ());
|
||||
_appVirDirInited = true;
|
||||
}
|
||||
|
||||
// Put to the TLS current AppDomain of the servlet, so anyone can use it.
|
||||
vmw.@internal.EnvironmentUtils.setAppDomain(servletDomain);
|
||||
|
||||
// put request to the TLS
|
||||
//Thread.SetData(_servletRequestSlot, req);
|
||||
//// put response to the TLS
|
||||
//Thread.SetData(_servletResponseSlot, resp);
|
||||
//// put the servlet object to the TLS
|
||||
//Thread.SetData(_servletSlot, this);
|
||||
|
||||
resp.setHeader("X-Powered-By", "ASP.NET");
|
||||
resp.setHeader("X-AspNet-Version", "1.1.4322");
|
||||
|
||||
HttpWorkerRequest gwr = new ServletWorkerRequest (this, req, resp);
|
||||
CultureInfo culture = (CultureInfo) vmw.@internal.EnvironmentUtils.getCultureInfoFromLocale (req.getLocale ());
|
||||
Thread currentTread = Thread.CurrentThread;
|
||||
currentTread.CurrentCulture = culture;
|
||||
currentTread.CurrentUICulture = culture;
|
||||
HttpRuntime.ProcessRequest(gwr);
|
||||
}
|
||||
finally
|
||||
{
|
||||
HttpContext.Current = null;
|
||||
//Thread.SetData(_servletRequestSlot, null);
|
||||
//Thread.SetData(_servletResponseSlot, null);
|
||||
//Thread.SetData(_servletSlot, null);
|
||||
vmw.@internal.EnvironmentUtils.clearAppDomain();
|
||||
}
|
||||
}
|
||||
|
||||
override public void destroy()
|
||||
{
|
||||
base.destroy();
|
||||
DestroyRuntime (getServletContext (), this);
|
||||
}
|
||||
|
||||
public static void DestroyRuntime (ServletContext context, IJDBCDriverDeregisterer evidence) {
|
||||
AppDomain servletDomain = (AppDomain) context.getAttribute (J2EEConsts.APP_DOMAIN);
|
||||
if (servletDomain == null)
|
||||
return;
|
||||
|
||||
try {
|
||||
vmw.@internal.EnvironmentUtils.setAppDomain (servletDomain);
|
||||
Debug.WriteLine ("Destroy of GhHttpServlet");
|
||||
HttpRuntime.Close ();
|
||||
vmw.@internal.EnvironmentUtils.cleanAllBeforeServletDestroy (evidence);
|
||||
context.removeAttribute (J2EEConsts.APP_DOMAIN);
|
||||
try {
|
||||
FactoryFinder.releaseFactories ();
|
||||
}
|
||||
catch (FacesException) { }
|
||||
|
||||
java.lang.ClassLoader appClassLoader = vmw.common.TypeUtils.ToClass (evidence).getClassLoader ();
|
||||
|
||||
IJDBCDriverDeregisterer dereg = evidence;
|
||||
|
||||
java.util.Enumeration en = java.sql.DriverManager.getDrivers ();
|
||||
while (en.hasMoreElements ()) {
|
||||
Object o = en.nextElement ();
|
||||
if (vmw.common.TypeUtils.ToClass (o).getClassLoader () == appClassLoader)
|
||||
dereg.DeregisterDriver ((java.sql.Driver) o);
|
||||
}
|
||||
|
||||
java.lang.Thread.currentThread ().setContextClassLoader (null);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Debug.WriteLine (String.Format ("ERROR in Servlet Destroy {0},{1}", e.GetType (), e.Message));
|
||||
Debug.WriteLine (e.StackTrace);
|
||||
}
|
||||
finally {
|
||||
vmw.@internal.EnvironmentUtils.clearAppDomain ();
|
||||
}
|
||||
}
|
||||
|
||||
private static AppDomain createServletDomain(ServletConfig config)
|
||||
{
|
||||
string rootPath = J2EEUtils.GetApplicationRealPath(config.getServletContext ());
|
||||
AppDomainSetup domainSetup = new AppDomainSetup();
|
||||
string name = config.getServletName();//.getServletContextName();
|
||||
if (name == null)
|
||||
name = "GH Application";
|
||||
domainSetup.ApplicationName = name;
|
||||
domainSetup.ConfigurationFile = Path.Combine (rootPath, "Web.config");
|
||||
domainSetup.PrivateBinPath = Path.Combine (rootPath, "WEB-INF/lib");
|
||||
|
||||
AppDomain servletDomain = AppDomain.CreateDomain(name, null, domainSetup);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//servletDomain.SetData(IAppDomainConfig.APP_PHYS_DIR, J2EEUtils.GetApplicationPhysicalPath(config));
|
||||
//servletDomain.SetData(IAppDomainConfig.WEB_APP_DIR, rootPath);
|
||||
|
||||
servletDomain.SetData(IAppDomainConfig.APP_PHYS_DIR, J2EEUtils.GetApplicationPhysicalPath(config.getServletContext ()));
|
||||
servletDomain.SetData(IAppDomainConfig.WEB_APP_DIR, rootPath);
|
||||
servletDomain.SetData(IAppDomainConfig.SERVLET_CONFIG, config);
|
||||
|
||||
//Set DataDirectory substitution string (http://blogs.msdn.com/dataaccess/archive/2005/10/28/486273.aspx)
|
||||
string dataDirectory = config.getServletContext ().getInitParameter ("DataDirectory");
|
||||
if (dataDirectory == null)
|
||||
dataDirectory = "App_Data";
|
||||
|
||||
if (!Path.IsPathRooted (dataDirectory)) {
|
||||
java.io.InputStream inputStream = config.getServletContext ().getResourceAsStream ("/WEB-INF/classes/appData.properties");
|
||||
string root;
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
Properties props = new Properties ();
|
||||
props.load (inputStream);
|
||||
root = props.getProperty ("root.folder");
|
||||
}
|
||||
finally {
|
||||
inputStream.close ();
|
||||
}
|
||||
}
|
||||
else
|
||||
root = config.getServletContext ().getRealPath ("/");
|
||||
|
||||
if (root == null)
|
||||
root = String.Empty;
|
||||
|
||||
dataDirectory = Path.Combine (root, dataDirectory);
|
||||
}
|
||||
|
||||
if (dataDirectory [dataDirectory.Length - 1] != Path.DirectorySeparatorChar)
|
||||
dataDirectory += Path.DirectorySeparatorChar;
|
||||
|
||||
servletDomain.SetData ("DataDirectory", dataDirectory);
|
||||
|
||||
if (config.getServletContext ().getRealPath ("/") == null)
|
||||
servletDomain.SetData(".appStartTime", DateTime.UtcNow);
|
||||
|
||||
// The BaseDir is the full path to the physical dir of the app
|
||||
// and allows the application to modify files in the case of
|
||||
// open deployment.
|
||||
string webApp_baseDir = config.getServletContext().getRealPath("");
|
||||
if (webApp_baseDir == null || webApp_baseDir == "")
|
||||
webApp_baseDir = rootPath;
|
||||
servletDomain.SetData(IAppDomainConfig.APP_BASE_DIR , webApp_baseDir);
|
||||
Debug.WriteLine("Initialization of webapp " + webApp_baseDir);
|
||||
//servletDomain.SetData(".hostingVirtualPath", "/");
|
||||
//servletDomain.SetData(".hostingInstallDir", "/");
|
||||
return servletDomain;
|
||||
}
|
||||
|
||||
#region IJDBCDriverDeregisterer Members
|
||||
|
||||
public void DeregisterDriver (java.sql.Driver driver) {
|
||||
java.sql.DriverManager.deregisterDriver (driver);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Web.GH
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseHttpServlet : Mainsoft.Web.Hosting.BaseHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace System.Web.J2EE
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseHttpServlet : Mainsoft.Web.Hosting.BaseHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class GhDynamicHttpServlet : System.Web.GH.BaseHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
public class GhStaticHttpServlet : System.Web.GH.BaseStaticHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
public class GhHttpServlet : System.Web.GH.BaseHttpServlet
|
||||
{
|
||||
GhStaticHttpServlet staticServlet;
|
||||
|
||||
public GhHttpServlet () {
|
||||
staticServlet = new GhStaticHttpServlet ();
|
||||
}
|
||||
|
||||
override public void init (ServletConfig config) {
|
||||
base.init (config);
|
||||
staticServlet.init (config);
|
||||
}
|
||||
|
||||
override protected void service (HttpServletRequest req, HttpServletResponse resp) {
|
||||
string pathInfo = req.getRequestURI ();
|
||||
string contextPath = req.getContextPath ();
|
||||
if (pathInfo.Equals (contextPath) ||
|
||||
((pathInfo.Length - contextPath.Length) == 1) &&
|
||||
pathInfo [pathInfo.Length - 1] == '/' && pathInfo.StartsWith (contextPath))
|
||||
pathInfo = contextPath + req.getServletPath ();
|
||||
if (pathInfo.EndsWith (".aspx") ||
|
||||
pathInfo.EndsWith (".asmx") ||
|
||||
pathInfo.EndsWith (".invoke")) {
|
||||
base.service (req, resp);
|
||||
}
|
||||
else {
|
||||
staticServlet.service (req, resp);
|
||||
}
|
||||
}
|
||||
|
||||
override public void destroy () {
|
||||
staticServlet.destroy ();
|
||||
base.destroy ();
|
||||
}
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
//
|
||||
// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Configuration;
|
||||
using System.Web;
|
||||
using System.Threading;
|
||||
|
||||
using javax.servlet;
|
||||
using javax.servlet.http;
|
||||
using vmw.common;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseStaticHttpServlet : HttpServlet
|
||||
{
|
||||
public BaseStaticHttpServlet()
|
||||
{
|
||||
}
|
||||
|
||||
override public void init(ServletConfig config)
|
||||
{
|
||||
base.init(config);
|
||||
AppDir = config.getServletContext ().getInitParameter (IAppDomainConfig.APP_DIR_NAME);
|
||||
if (AppDir != null) {
|
||||
AppDir = AppDir.Replace('\\', '/');
|
||||
if (AppDir[AppDir.Length - 1] != '/')
|
||||
AppDir += '/';
|
||||
}
|
||||
}
|
||||
|
||||
override protected void service(HttpServletRequest req, HttpServletResponse resp)
|
||||
{
|
||||
resp.setHeader("X-Powered-By", "ASP.NET");
|
||||
resp.setHeader("X-AspNet-Version", "1.1.4322");
|
||||
|
||||
String filename = getServletContext().getRealPath(req.getServletPath());
|
||||
ServletOutputStream hos;
|
||||
try {
|
||||
hos = resp.getOutputStream();
|
||||
}
|
||||
catch (java.lang.IllegalStateException e)
|
||||
{
|
||||
string mimeType = getServletContext().getMimeType(filename);
|
||||
if (mimeType == null || mimeType.StartsWith("text")) {
|
||||
sendFileUsingWriter(resp, filename);
|
||||
return;
|
||||
}
|
||||
else
|
||||
throw e;
|
||||
}
|
||||
try
|
||||
{
|
||||
string mimeType = this.getServletContext().getMimeType(filename);
|
||||
if (mimeType == null)
|
||||
mimeType = "text/plain";
|
||||
|
||||
resp.setContentType(mimeType);
|
||||
|
||||
FileStream fis = null;
|
||||
try {
|
||||
fis = new FileStream(filename,FileMode.Open,FileAccess.Read);
|
||||
byte[] buf = new byte[4 * 1024]; // 4K buffer
|
||||
int bytesRead;
|
||||
while ((bytesRead = fis.Read(buf,0,buf.Length)) != -1 &&
|
||||
bytesRead != 0) {
|
||||
hos.write(TypeUtils.ToSByteArray(buf), 0, bytesRead);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (fis != null) fis.Close();
|
||||
}
|
||||
}
|
||||
catch (System.IO.FileNotFoundException e)
|
||||
{
|
||||
resp.setStatus(404,"Object Not Found.");
|
||||
HttpException myExp = new HttpException (404, "File '" + filename + "' not found.");
|
||||
hos.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
hos.flush();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Trace.WriteLine (String.Format ("ERROR in Static File Reading {0},{1}", e.GetType (), e.Message));
|
||||
resp.setStatus(500);
|
||||
HttpException myExp = new HttpException ("Exception in Reading static file", e);
|
||||
hos.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
hos.flush();
|
||||
}
|
||||
}
|
||||
|
||||
void sendFileUsingWriter(HttpServletResponse resp, string filename)
|
||||
{
|
||||
java.io.PrintWriter writer = resp.getWriter();
|
||||
try
|
||||
{
|
||||
resp.setContentType(this.getServletContext().getMimeType(filename));
|
||||
StreamReader fis = null;
|
||||
char[] buf = new char[4 * 1024]; // 4K buffer
|
||||
try {
|
||||
fis = new StreamReader(filename);
|
||||
int charsRead;
|
||||
while ((charsRead = fis.Read(buf,0,buf.Length)) != -1 &&
|
||||
charsRead != 0) {
|
||||
writer.write(buf, 0, charsRead);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if (fis != null) fis.Close();
|
||||
}
|
||||
}
|
||||
catch (System.IO.FileNotFoundException e)
|
||||
{
|
||||
resp.setStatus(404,"Object Not Found.");
|
||||
HttpException myExp = new HttpException (404, "File '" + filename + "' not found.");
|
||||
writer.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
writer.flush();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Trace.WriteLine (String.Format ("ERROR in Static File Reading {0},{1}", e.GetType (), e.Message));
|
||||
resp.setStatus(500);
|
||||
HttpException myExp = new HttpException ("Exception in Reading static file", e);
|
||||
writer.print(((HttpException) myExp).GetHtmlErrorMessage ());
|
||||
writer.flush();
|
||||
}
|
||||
}
|
||||
|
||||
override public void destroy()
|
||||
{
|
||||
base.destroy();
|
||||
}
|
||||
|
||||
private string AppDir;
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Web.J2EE
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseStaticHttpServlet : Mainsoft.Web.Hosting.BaseStaticHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace System.Web.GH
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class BaseStaticHttpServlet : Mainsoft.Web.Hosting.BaseStaticHttpServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public interface IExtendedViewHandler
|
||||
{
|
||||
string EncodeNamespace (FacesContext facesContext, string value);
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.IncludeHelperServlet
|
||||
//
|
||||
// Authors:
|
||||
// Eyal Alaluf ([email protected])
|
||||
//
|
||||
// (C) 2006 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web.UI;
|
||||
using java.io;
|
||||
using javax.servlet;
|
||||
using javax.servlet.http;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class IncludeHelperServlet : HttpServlet
|
||||
{
|
||||
public IncludeHelperServlet()
|
||||
{
|
||||
}
|
||||
|
||||
override protected void service(HttpServletRequest req, HttpServletResponse resp)
|
||||
{
|
||||
string servletPath = ServletIncludeUtils.getServletPath(req);
|
||||
TextWriter writer = (TextWriter)ServletIncludeUtils.getTextWriter(req);
|
||||
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(servletPath);
|
||||
HttpServletResponseWrapper wrapper = new AspxResponseWrapper(resp, writer);
|
||||
dispatcher.include(req, wrapper);
|
||||
}
|
||||
|
||||
sealed class AspxResponseWrapper : HttpServletResponseWrapper
|
||||
{
|
||||
public AspxResponseWrapper(HttpServletResponse resp, TextWriter writer) : base (resp)
|
||||
{
|
||||
jwriter = new PrintWriter(new JavaWriterFromTextWriter(writer));
|
||||
}
|
||||
|
||||
public override PrintWriter getWriter()
|
||||
{
|
||||
return jwriter;
|
||||
}
|
||||
|
||||
readonly PrintWriter jwriter;
|
||||
}
|
||||
|
||||
sealed class JavaWriterFromTextWriter : Writer
|
||||
{
|
||||
public JavaWriterFromTextWriter(TextWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
}
|
||||
|
||||
public override void flush()
|
||||
{
|
||||
writer.Flush ();
|
||||
}
|
||||
|
||||
public override void write(char[] buffer, int offset, int count)
|
||||
{
|
||||
writer.Write(buffer, offset, count);
|
||||
}
|
||||
|
||||
public override void write(String s)
|
||||
{
|
||||
writer.Write(s);
|
||||
}
|
||||
|
||||
public override void write(string s, int start, int count)
|
||||
{
|
||||
if (start == 0 && count == s.Length)
|
||||
writer.Write(s);
|
||||
else
|
||||
writer.Write(s.Substring(start, count));
|
||||
}
|
||||
|
||||
public override void close()
|
||||
{
|
||||
// Ignore close as we don't own here the writer.
|
||||
}
|
||||
|
||||
readonly TextWriter writer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace System.Web.GH
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class supports the Framework infrastructure and is not intended to be used directly from your code.</para>
|
||||
/// </summary>
|
||||
public class IncludeHelperServlet : Mainsoft.Web.Hosting.IncludeHelperServlet
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.OutputStreamWrapper
|
||||
//
|
||||
// Authors:
|
||||
// Vladimir Krasnov ([email protected])
|
||||
//
|
||||
// (C) 2006 Mainsoft
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using java.io;
|
||||
using vmw.common;
|
||||
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class OutputStreamWrapper : java.io.Writer
|
||||
{
|
||||
enum OutputMode
|
||||
{
|
||||
CharWriter,
|
||||
ByteStream,
|
||||
}
|
||||
|
||||
readonly PrintWriter _printWriter;
|
||||
readonly OutputStream _outputStream;
|
||||
readonly OutputMode _outputMode;
|
||||
|
||||
private byte [] _bytebuffer;
|
||||
private char [] _charBuffer;
|
||||
//sbyte [] _oneByte = new sbyte [1];
|
||||
|
||||
Encoding _encoding = null;
|
||||
|
||||
/// <summary>
|
||||
/// Ctor from writer
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
public OutputStreamWrapper (PrintWriter writer)
|
||||
{
|
||||
_printWriter = writer;
|
||||
_outputMode = OutputMode.CharWriter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ctor from stream
|
||||
/// </summary>
|
||||
/// <param name="outputStream"></param>
|
||||
public OutputStreamWrapper (OutputStream outputStream)
|
||||
{
|
||||
_outputStream = outputStream;
|
||||
_outputMode = OutputMode.ByteStream;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void close ()
|
||||
{
|
||||
// BUGBUG
|
||||
// on WPS, closing the writer causes
|
||||
// any portlets rendered after us to be not shown...
|
||||
//_writer.close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flushes servers stream
|
||||
/// </summary>
|
||||
public override void flush ()
|
||||
{
|
||||
if (_outputMode == OutputMode.CharWriter)
|
||||
_printWriter.flush ();
|
||||
else
|
||||
_outputStream.flush();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes char array
|
||||
/// </summary>
|
||||
/// <param name="chars"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="count"></param>
|
||||
public override void write (char [] chars, int index, int count)
|
||||
{
|
||||
if (_outputMode == OutputMode.CharWriter) {
|
||||
_printWriter.write (chars, index, count);
|
||||
}
|
||||
else {
|
||||
int length = Encoding.GetMaxByteCount (count);
|
||||
byte [] bytebuffer = GetByteBuffer (length);
|
||||
int realLength = Encoding.GetBytes (chars, index, count, bytebuffer, 0);
|
||||
|
||||
_outputStream.write (TypeUtils.ToSByteArray (bytebuffer), 0, realLength);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes byte array
|
||||
/// </summary>
|
||||
/// <param name="sbytes"></param>
|
||||
/// <param name="index"></param>
|
||||
/// <param name="count"></param>
|
||||
public void write (sbyte [] sbytes, int index, int count)
|
||||
{
|
||||
if (_outputMode == OutputMode.ByteStream)
|
||||
_outputStream.write (sbytes, index, count);
|
||||
else {
|
||||
int length = Encoding.GetMaxCharCount (count);
|
||||
char [] charbuffer = GetCharBuffer (length);
|
||||
int realLength = Encoding.GetChars ((byte []) TypeUtils.ToByteArray (sbytes), index, count, charbuffer, 0);
|
||||
|
||||
_printWriter.write (charbuffer, 0, realLength);
|
||||
}
|
||||
}
|
||||
|
||||
private char [] GetCharBuffer (int length)
|
||||
{
|
||||
// We will reuse the buffer if its size is < 32K
|
||||
if (_charBuffer != null && _charBuffer.Length >= length)
|
||||
return _charBuffer;
|
||||
|
||||
if (length > 32 * 1024)
|
||||
return new char [length];
|
||||
|
||||
if (length < 1024)
|
||||
length = 1024;
|
||||
|
||||
_charBuffer = new char [length];
|
||||
return _charBuffer;
|
||||
}
|
||||
|
||||
private byte [] GetByteBuffer (int length)
|
||||
{
|
||||
// We will reuse the buffer if its size is < 32K
|
||||
if (_bytebuffer != null && _bytebuffer.Length >= length)
|
||||
return _bytebuffer;
|
||||
|
||||
if (length > 32 * 1024)
|
||||
return new byte [length];
|
||||
|
||||
if (length < 1024)
|
||||
length = 1024;
|
||||
|
||||
_bytebuffer = new byte [length];
|
||||
return _bytebuffer;
|
||||
}
|
||||
|
||||
private Encoding Encoding
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_encoding == null) {
|
||||
HttpContext current = HttpContext.Current;
|
||||
_encoding = (current != null) ? current.Response.ContentEncoding : Encoding.UTF8;
|
||||
}
|
||||
return _encoding;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.RequestParameterMap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using java.util;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections;
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
partial class BaseExternalContext
|
||||
{
|
||||
abstract class BaseRequestParameterMap : AbstractAttributeMap
|
||||
{
|
||||
readonly NameValueCollection _form;
|
||||
|
||||
protected BaseRequestParameterMap (NameValueCollection form) {
|
||||
_form = form;
|
||||
}
|
||||
|
||||
protected NameValueCollection Form {
|
||||
get { return _form; }
|
||||
}
|
||||
|
||||
protected override void setAttribute (String key, Object value) {
|
||||
throw new NotSupportedException (
|
||||
"Cannot set Request Parameter");
|
||||
}
|
||||
|
||||
protected override void removeAttribute (String key) {
|
||||
throw new NotSupportedException (
|
||||
"Cannot remove Request Parameter");
|
||||
}
|
||||
|
||||
protected override Enumeration getAttributeNames () {
|
||||
return new EnumerationImpl (_form.Keys.GetEnumerator ());
|
||||
}
|
||||
|
||||
sealed class EnumerationImpl : Enumeration
|
||||
{
|
||||
readonly IEnumerator _en;
|
||||
public EnumerationImpl (IEnumerator en) {
|
||||
_en = en;
|
||||
}
|
||||
|
||||
#region Enumeration Members
|
||||
|
||||
public bool hasMoreElements () {
|
||||
return _en.MoveNext ();
|
||||
}
|
||||
|
||||
public object nextElement () {
|
||||
return _en.Current;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
sealed class RequestParameterMap : BaseRequestParameterMap
|
||||
{
|
||||
public RequestParameterMap (NameValueCollection form)
|
||||
: base (form) {
|
||||
}
|
||||
|
||||
protected override Object getAttribute (String key) {
|
||||
return Form [key];
|
||||
}
|
||||
}
|
||||
|
||||
sealed class IEnumeratorIteratorImpl : Iterator
|
||||
{
|
||||
readonly private IEnumerator _en;
|
||||
|
||||
public IEnumeratorIteratorImpl (IEnumerator en) {
|
||||
_en = en;
|
||||
}
|
||||
|
||||
public bool hasNext () {
|
||||
return _en.MoveNext ();
|
||||
}
|
||||
|
||||
public Object next () {
|
||||
return _en.Current;
|
||||
}
|
||||
|
||||
public void remove () {
|
||||
throw new NotSupportedException (GetType ().Name + " UnsupportedOperationException");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// Mainsoft.Web.Hosting.RequestParameterValuesMap.cs
|
||||
//
|
||||
// Authors:
|
||||
// Konstantin Triger <[email protected]>
|
||||
//
|
||||
// (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using java.util;
|
||||
using System.Collections.Specialized;
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
partial class BaseExternalContext
|
||||
{
|
||||
sealed class RequestParameterValuesMap : BaseRequestParameterMap
|
||||
{
|
||||
public RequestParameterValuesMap (NameValueCollection form)
|
||||
: base (form) {
|
||||
}
|
||||
|
||||
protected override Object getAttribute (String key) {
|
||||
return Form.GetValues (key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.context;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using javax.servlet;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.faces.application;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public class ServletFacesContext : AspNetFacesContext
|
||||
{
|
||||
protected ServletFacesContext (FacesContext wrappedFacesContext, ExternalContext externalContext, HttpContext httpContext, FacesContext oldFacesContext)
|
||||
: base (wrappedFacesContext, externalContext, httpContext, oldFacesContext) {
|
||||
}
|
||||
|
||||
public static ServletFacesContext GetFacesContext (FacesContextFactory facesContextFactory,
|
||||
ServletContext servletContext,
|
||||
ServletRequest servletRequest,
|
||||
ServletResponse servletResponse,
|
||||
Lifecycle lifecycle,
|
||||
HttpContext httpContext,
|
||||
string executionFilePath) {
|
||||
FacesContext oldFacesContex = FacesContext.getCurrentInstance ();
|
||||
FacesContext wrappedFacesContex = facesContextFactory.getFacesContext (servletContext, servletRequest, servletResponse, lifecycle);
|
||||
ExternalContext externalContext = new ServletExternalContext (wrappedFacesContex.getExternalContext (), httpContext, executionFilePath);
|
||||
ServletFacesContext context = new ServletFacesContext (wrappedFacesContex, externalContext, httpContext, oldFacesContex);
|
||||
return context;
|
||||
}
|
||||
|
||||
}
|
||||
#region ServletExternalContext
|
||||
|
||||
public class ServletExternalContext : BaseExternalContext
|
||||
{
|
||||
readonly ExternalContext _externalContext;
|
||||
|
||||
public ServletExternalContext (ExternalContext externalContext, HttpContext httpContext, string executionFilePath)
|
||||
: base (httpContext, executionFilePath) {
|
||||
_externalContext = externalContext;
|
||||
}
|
||||
|
||||
public override void dispatch (string __p1) {
|
||||
_externalContext.dispatch (__p1);
|
||||
}
|
||||
|
||||
public override string encodeActionURL (string __p1) {
|
||||
return _externalContext.encodeActionURL (__p1);
|
||||
}
|
||||
|
||||
public override string encodeNamespace (string __p1) {
|
||||
return _externalContext.encodeNamespace (__p1);
|
||||
}
|
||||
|
||||
public override string encodeResourceURL (string __p1) {
|
||||
return _externalContext.encodeResourceURL (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Map getApplicationMap () {
|
||||
return _externalContext.getApplicationMap ();
|
||||
}
|
||||
|
||||
public override string getAuthType () {
|
||||
return _externalContext.getAuthType ();
|
||||
}
|
||||
|
||||
public override object getContext () {
|
||||
return _externalContext.getContext ();
|
||||
}
|
||||
|
||||
public override string getInitParameter (string __p1) {
|
||||
return _externalContext.getInitParameter (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Map getInitParameterMap () {
|
||||
return _externalContext.getInitParameterMap ();
|
||||
}
|
||||
|
||||
public override string getRemoteUser () {
|
||||
return _externalContext.getRemoteUser ();
|
||||
}
|
||||
|
||||
public override object getRequest () {
|
||||
return _externalContext.getRequest ();
|
||||
}
|
||||
|
||||
public override string getRequestContextPath () {
|
||||
return _externalContext.getRequestContextPath ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestCookieMap () {
|
||||
return _externalContext.getRequestCookieMap ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestHeaderMap () {
|
||||
return _externalContext.getRequestHeaderMap ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestHeaderValuesMap () {
|
||||
return _externalContext.getRequestHeaderValuesMap ();
|
||||
}
|
||||
|
||||
public override java.util.Locale getRequestLocale () {
|
||||
return _externalContext.getRequestLocale ();
|
||||
}
|
||||
|
||||
public override java.util.Iterator getRequestLocales () {
|
||||
return _externalContext.getRequestLocales ();
|
||||
}
|
||||
|
||||
public override java.util.Map getRequestMap () {
|
||||
return _externalContext.getRequestMap ();
|
||||
}
|
||||
|
||||
public override string getRequestServletPath () {
|
||||
return _externalContext.getRequestServletPath ();
|
||||
}
|
||||
|
||||
public override java.net.URL getResource (string __p1) {
|
||||
return _externalContext.getResource (__p1);
|
||||
}
|
||||
|
||||
public override java.io.InputStream getResourceAsStream (string __p1) {
|
||||
return _externalContext.getResourceAsStream (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Set getResourcePaths (string __p1) {
|
||||
return _externalContext.getResourcePaths (__p1);
|
||||
}
|
||||
|
||||
public override object getResponse () {
|
||||
return _externalContext.getResponse ();
|
||||
}
|
||||
|
||||
public override object getSession (bool __p1) {
|
||||
return _externalContext.getSession (__p1);
|
||||
}
|
||||
|
||||
public override java.util.Map getSessionMap () {
|
||||
return _externalContext.getSessionMap ();
|
||||
}
|
||||
|
||||
public override java.security.Principal getUserPrincipal () {
|
||||
return _externalContext.getUserPrincipal ();
|
||||
}
|
||||
|
||||
public override bool isUserInRole (string __p1) {
|
||||
return _externalContext.isUserInRole (__p1);
|
||||
}
|
||||
|
||||
public override void log (string __p1, Exception __p2) {
|
||||
_externalContext.log (__p1, __p2);
|
||||
}
|
||||
|
||||
public override void log (string __p1) {
|
||||
_externalContext.log (__p1);
|
||||
}
|
||||
|
||||
public override void redirect (string __p1) {
|
||||
_externalContext.redirect (__p1);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using javax.faces.component;
|
||||
using System.Web.UI;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.faces;
|
||||
using javax.servlet;
|
||||
using javax.faces.webapp;
|
||||
using javax.servlet.http;
|
||||
using vmw.common;
|
||||
using System.Diagnostics;
|
||||
using javax.faces.render;
|
||||
using System.IO;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public abstract class BaseFacesPageHandler
|
||||
{
|
||||
static protected void SetupResponseWriter (AspNetFacesContext facesContext, string contentType, string characterEncoding) {
|
||||
RenderKit renderKit = BaseHttpServlet.RenderKitFactory.getRenderKit (facesContext, facesContext.getViewRoot ().getRenderKitId ());
|
||||
ResponseWriter writer = renderKit.createResponseWriter (new AspNetResponseWriter (facesContext.Context.Response.Output), contentType, characterEncoding);
|
||||
facesContext.setResponseWriter (writer);
|
||||
}
|
||||
|
||||
#region AspNetResponseWriter
|
||||
private sealed class AspNetResponseWriter : java.io.Writer
|
||||
{
|
||||
readonly TextWriter _writer;
|
||||
public AspNetResponseWriter (TextWriter writer) {
|
||||
_writer = writer;
|
||||
}
|
||||
public override void close () {
|
||||
_writer.Close ();
|
||||
}
|
||||
|
||||
public override void flush () {
|
||||
_writer.Flush ();
|
||||
}
|
||||
|
||||
public override void write (char [] __p1, int __p2, int __p3) {
|
||||
_writer.Write (__p1, __p2, __p3);
|
||||
}
|
||||
|
||||
public override void write (int __p1) {
|
||||
_writer.Write ((char) __p1);
|
||||
}
|
||||
|
||||
public override void write (char [] __p1) {
|
||||
_writer.Write (__p1);
|
||||
}
|
||||
|
||||
public override void write (string __p1) {
|
||||
_writer.Write (__p1);
|
||||
}
|
||||
|
||||
public override void write (string __p1, int __p2, int __p3) {
|
||||
_writer.Write (__p1, __p2, __p3);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class ServletFacesPageHandler : BaseFacesPageHandler, IHttpHandler, IServiceProvider
|
||||
{
|
||||
readonly FacesContextFactory _facesContextFactory;
|
||||
readonly Lifecycle _lifecycle;
|
||||
readonly string _executionFilePath;
|
||||
readonly Type _pageType;
|
||||
Page _page;
|
||||
|
||||
public bool IsReusable {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public ServletFacesPageHandler (string executionFilePath, Type pageType, FacesContextFactory facesContextFactory, Lifecycle lifecycle) {
|
||||
_facesContextFactory = facesContextFactory;
|
||||
_lifecycle = lifecycle;
|
||||
_executionFilePath = executionFilePath;
|
||||
_pageType = pageType;
|
||||
}
|
||||
|
||||
protected virtual ServletFacesContext GetFacesContext (FacesContextFactory facesContextFactory,
|
||||
ServletContext servletContext,
|
||||
ServletRequest servletRequest,
|
||||
ServletResponse servletResponse,
|
||||
Lifecycle lifecycle,
|
||||
HttpContext httpContext,
|
||||
string executionFilePath) {
|
||||
return ServletFacesContext.GetFacesContext (facesContextFactory, servletContext, servletRequest, servletResponse, lifecycle, httpContext, executionFilePath);
|
||||
}
|
||||
|
||||
public void ProcessRequest (HttpContext context) {
|
||||
ServletWorkerRequest wr = (ServletWorkerRequest) ((IServiceProvider) context).GetService (typeof (HttpWorkerRequest));
|
||||
ServletContext servletContext = wr.GetContext ();
|
||||
HttpServletRequest request = wr.ServletRequest;
|
||||
HttpServletResponse response = wr.ServletResponse;
|
||||
|
||||
ServletFacesContext facesContext = GetFacesContext (_facesContextFactory, servletContext, request, response, _lifecycle, context, _executionFilePath);
|
||||
try {
|
||||
try {
|
||||
try {
|
||||
Trace.WriteLine ("FacesPageHandler: before execute");
|
||||
_lifecycle.execute (facesContext);
|
||||
Trace.WriteLine ("FacesPageHandler: after execute");
|
||||
}
|
||||
finally {
|
||||
UIViewRoot viewRoot = facesContext.getViewRoot ();
|
||||
if (viewRoot != null && viewRoot.getChildCount () > 0)
|
||||
_page = (Page) viewRoot.getChildren ().get (0);
|
||||
}
|
||||
Trace.WriteLine ("FacesPageHandler: before render");
|
||||
SetupResponseWriter (facesContext, response.getContentType (), response.getCharacterEncoding ());
|
||||
_lifecycle.render (facesContext);
|
||||
Trace.WriteLine ("FacesPageHandler: after render");
|
||||
}
|
||||
catch (FacesException fex) {
|
||||
Exception inner = fex.InnerException;
|
||||
if (inner != null)
|
||||
TypeUtils.Throw (inner);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
finally {
|
||||
facesContext.release ();
|
||||
}
|
||||
}
|
||||
|
||||
public object GetService (Type serviceType) {
|
||||
if (serviceType == typeof (Type))
|
||||
return _pageType;
|
||||
if (serviceType == typeof (Page))
|
||||
return _page;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System.Web;
|
||||
using System.Web.Compilation;
|
||||
using System.Web.UI;
|
||||
using javax.faces.component;
|
||||
using javax.servlet;
|
||||
using javax.faces.context;
|
||||
using javax.faces.lifecycle;
|
||||
using javax.servlet.http;
|
||||
using System;
|
||||
using javax.faces.webapp;
|
||||
using javax.faces;
|
||||
using System.Web.J2EE;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public sealed class ServletFacesPageHandlerFactory : BaseFacesPageHandlerFactory
|
||||
{
|
||||
public override IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path) {
|
||||
Type pageType = PageMapper.GetObjectType (context, url);
|
||||
IHttpHandler handler = new ServletFacesPageHandler (url, pageType, BaseHttpServlet.FacesContextFactory, BaseHttpServlet.Lifecycle);
|
||||
return SessionWrapper.WrapHandler (handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web.UI;
|
||||
|
||||
using javax.faces;
|
||||
using javax.faces.application;
|
||||
using javax.faces.render;
|
||||
using javax.faces.component;
|
||||
using javax.faces.context;
|
||||
using System.Web.Hosting;
|
||||
using System.Web;
|
||||
using java.util;
|
||||
using System.Diagnostics;
|
||||
using javax.servlet.http;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public sealed class ServletFacesStateManager : BaseFacesStateManager
|
||||
{
|
||||
public override void writeState (FacesContext facesContext, StateManager.SerializedView serializedView) {
|
||||
Trace.WriteLine ("Entering writeState");
|
||||
|
||||
if (serializedView != null) {
|
||||
if (isSavingStateInClient (facesContext)) {
|
||||
SaveStateInClient (facesContext, serializedView);
|
||||
}
|
||||
else {
|
||||
HttpSession session = (HttpSession) facesContext.getExternalContext ().getSession (true);
|
||||
string key = ((IExtendedViewHandler) facesContext.getApplication ().getViewHandler ()).EncodeNamespace (facesContext, VIEWSTATE);
|
||||
session.setAttribute (key, serializedView);
|
||||
}
|
||||
}
|
||||
|
||||
Trace.WriteLine ("Exiting writeState");
|
||||
}
|
||||
|
||||
protected override void restoreComponentState (FacesContext facesContext,
|
||||
javax.faces.component.UIViewRoot uiViewRoot,
|
||||
String renderKitId) {
|
||||
|
||||
Trace.WriteLine ("Entering restoreComponentState");
|
||||
|
||||
Object serializedComponentStates;
|
||||
if (isSavingStateInClient (facesContext)) {
|
||||
serializedComponentStates = GetStateFromClient (facesContext, uiViewRoot.getViewId(), renderKitId);
|
||||
}
|
||||
else {
|
||||
HttpSession session = (HttpSession) facesContext.getExternalContext ().getSession (false);
|
||||
if (session == null)
|
||||
serializedComponentStates = null;
|
||||
else {
|
||||
string key = ((IExtendedViewHandler) facesContext.getApplication ().getViewHandler ()).EncodeNamespace (facesContext, VIEWSTATE);
|
||||
SerializedView serializedView = session.getAttribute (key) as SerializedView;
|
||||
if (serializedView == null)
|
||||
serializedComponentStates = null;
|
||||
else
|
||||
serializedComponentStates = serializedView.getState ();
|
||||
}
|
||||
}
|
||||
((UIComponent) uiViewRoot.getChildren ().get (0)).processRestoreState (facesContext, serializedComponentStates);
|
||||
|
||||
Trace.WriteLine ("Exiting restoreComponentState");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.faces.application;
|
||||
using javax.servlet.http;
|
||||
using java.util;
|
||||
using javax.faces.context;
|
||||
using javax.faces.component;
|
||||
using java.lang;
|
||||
using javax.faces.render;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public class ServletFacesViewHandler : BaseFacesViewHandler
|
||||
{
|
||||
public ServletFacesViewHandler (ViewHandler viewHandler)
|
||||
: base (viewHandler) {
|
||||
}
|
||||
|
||||
public override string getActionURL (FacesContext facesContext, string viewId) {
|
||||
if (viewId.Length > 0 && viewId [0] == '/') {
|
||||
return facesContext.getExternalContext ().getRequestContextPath () + viewId;
|
||||
}
|
||||
else {
|
||||
return viewId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.servlet;
|
||||
using System.Web;
|
||||
using javax.servlet.http;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public class ServletIncludeUtils
|
||||
{
|
||||
public static void includeServlet (String servletPath, Object writer, Object aspPage, Object [] servletParams) {
|
||||
// Need to define logic for resolving the servletPath. Share code with portlet createRenderUrl.
|
||||
HttpContext context = HttpContext.Current;
|
||||
HttpWorkerRequest wr = (HttpWorkerRequest) ((IServiceProvider) context).GetService (typeof (HttpWorkerRequest));
|
||||
RequestDispatcher dispatcher = ((ServletContext) ((IServiceProvider) wr).GetService (typeof (ServletContext))).getRequestDispatcher (SERVLET_INCLUDE_HELPER_PATH);
|
||||
ServletResponse response = (ServletResponse) ((IServiceProvider) wr).GetService (typeof (ServletResponse));
|
||||
ServletRequest request = (ServletRequest) ((IServiceProvider) wr).GetService (typeof (ServletRequest));
|
||||
|
||||
// Setup params for the include call.
|
||||
String oldServletPath = (String) setAttribute (request, SERVLET_PATH_ATTRIBUTE_NAME, servletPath);
|
||||
Object oldAspPage = setAttribute (request, ASPPAGE_ATTRIBUTE_NAME, aspPage);
|
||||
Object [] oldServletParams = (Object []) setAttribute (request, SERVLET_PARAMS_ATTRIBUTE_NAME, servletParams);
|
||||
Object oldWriter = setAttribute (request, TEXT_WRITER_ATTRIBUTE_NAME, writer);
|
||||
|
||||
// Do the include call.
|
||||
dispatcher.include (request, response);
|
||||
|
||||
// Restore previous attribute values after the call.
|
||||
request.setAttribute (SERVLET_PATH_ATTRIBUTE_NAME, oldServletPath);
|
||||
request.setAttribute (ASPPAGE_ATTRIBUTE_NAME, oldAspPage);
|
||||
request.setAttribute (SERVLET_PARAMS_ATTRIBUTE_NAME, oldServletParams);
|
||||
request.setAttribute (TEXT_WRITER_ATTRIBUTE_NAME, oldWriter);
|
||||
}
|
||||
|
||||
public static String getServletPath (ServletRequest request) {
|
||||
return (String) request.getAttribute (SERVLET_PATH_ATTRIBUTE_NAME);
|
||||
}
|
||||
public static Object getAspPage (ServletRequest request) {
|
||||
return request.getAttribute (ASPPAGE_ATTRIBUTE_NAME);
|
||||
}
|
||||
public static Object [] getServletParams (ServletRequest request) {
|
||||
return (Object []) request.getAttribute (SERVLET_PARAMS_ATTRIBUTE_NAME);
|
||||
}
|
||||
public static Object getTextWriter (ServletRequest request) {
|
||||
return request.getAttribute (TEXT_WRITER_ATTRIBUTE_NAME);
|
||||
}
|
||||
|
||||
private static Object setAttribute (ServletRequest request, String attrname, Object newval) {
|
||||
Object oldval = request.getAttribute (attrname);
|
||||
request.setAttribute (attrname, newval);
|
||||
return oldval;
|
||||
}
|
||||
|
||||
public static readonly String SERVLET_INCLUDE_HELPER_PATH = "/servletincludehelper";
|
||||
public static readonly String ASPPAGE_ATTRIBUTE_NAME = "vmw.servlet.include.asppage";
|
||||
public static readonly String SERVLET_PATH_ATTRIBUTE_NAME = "vmw.servlet.include.servlet.path";
|
||||
public static readonly String SERVLET_PARAMS_ATTRIBUTE_NAME = "vmw.servlet.include.servlet.params";
|
||||
public static readonly String TEXT_WRITER_ATTRIBUTE_NAME = "vmw.servlet.include.text.writer";
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using [email protected];
|
||||
using javax.servlet;
|
||||
using java.io;
|
||||
using java.net;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
class ServletResourceLoader : IResourceLoader
|
||||
{
|
||||
ServletContext _context;
|
||||
|
||||
public ServletResourceLoader (ServletContext context) {
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public URL getResource (String resourceName) {
|
||||
if (resourceName == null)
|
||||
throw new ArgumentNullException ("resourceName");
|
||||
|
||||
if (!resourceName.StartsWith ("/"))
|
||||
resourceName = "/" + resourceName;
|
||||
|
||||
return _context.getResource (resourceName);
|
||||
}
|
||||
|
||||
public InputStream getResourceAsStream (String resourceName) {
|
||||
if (resourceName == null)
|
||||
throw new ArgumentNullException ("resourceName");
|
||||
|
||||
if (!resourceName.StartsWith ("/"))
|
||||
resourceName = "/" + resourceName;
|
||||
|
||||
return _context.getResourceAsStream (resourceName);
|
||||
}
|
||||
|
||||
public java.util.Set getResourcePaths (String path) {
|
||||
if (path == null)
|
||||
throw new ArgumentNullException ("path");
|
||||
|
||||
if (!path.StartsWith ("/"))
|
||||
path = "/" + path;
|
||||
|
||||
return _context.getResourcePaths (path);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using javax.servlet.http;
|
||||
using java.security;
|
||||
using javax.servlet;
|
||||
|
||||
namespace Mainsoft.Web.Hosting
|
||||
{
|
||||
public sealed class ServletWorkerRequest : BaseWorkerRequest
|
||||
{
|
||||
readonly HttpServlet _HttpServlet;
|
||||
readonly HttpServletRequest _HttpServletRequest;
|
||||
readonly HttpServletResponse _HttpServletResponse;
|
||||
OutputStreamWrapper _outputStream;
|
||||
|
||||
public ServletWorkerRequest (HttpServlet servlet, HttpServletRequest req, HttpServletResponse resp)
|
||||
: base (req.getContextPath(), req.getServletPath (), req.getRequestURI ()) {
|
||||
|
||||
_HttpServlet = servlet;
|
||||
_HttpServletRequest = req;
|
||||
_HttpServletResponse = resp;
|
||||
|
||||
}
|
||||
|
||||
static readonly Type typeOfHttpServletRequest = typeof (HttpServletRequest);
|
||||
static readonly Type typeOfHttpServletResponse = typeof (HttpServletResponse);
|
||||
static readonly Type typeOfHttpServlet = typeof (HttpServlet);
|
||||
static readonly Type typeOfHttpSession = typeof (HttpSession);
|
||||
static readonly Type typeOfServletContext = typeof (ServletContext);
|
||||
static readonly Type typeOfServletConfig = typeof (ServletConfig);
|
||||
public override object GetService (Type serviceType) {
|
||||
if (serviceType == typeOfHttpServlet ||
|
||||
serviceType == typeOfServletConfig)
|
||||
return _HttpServlet;
|
||||
if (serviceType == typeOfHttpServletRequest)
|
||||
return _HttpServletRequest;
|
||||
if (serviceType == typeOfHttpServletResponse)
|
||||
return _HttpServletResponse;
|
||||
if (serviceType == typeOfHttpSession)
|
||||
return GetSession (false);
|
||||
if (serviceType == typeOfServletContext)
|
||||
return _HttpServlet.getServletContext ();
|
||||
return base.GetService (serviceType);
|
||||
}
|
||||
|
||||
public HttpServlet Servlet {
|
||||
get {
|
||||
return _HttpServlet;
|
||||
}
|
||||
}
|
||||
|
||||
public HttpServletRequest ServletRequest {
|
||||
get {
|
||||
return _HttpServletRequest;
|
||||
}
|
||||
}
|
||||
|
||||
public HttpServletResponse ServletResponse {
|
||||
get {
|
||||
return _HttpServletResponse;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetHttpVerbName () {
|
||||
return _HttpServletRequest.getMethod ();
|
||||
}
|
||||
|
||||
public override string GetHttpVersion () {
|
||||
return _HttpServletRequest.getProtocol ();
|
||||
}
|
||||
|
||||
public override string GetLocalAddress () {
|
||||
return _HttpServletRequest.getLocalAddr ();
|
||||
}
|
||||
|
||||
public override int GetLocalPort () {
|
||||
return _HttpServletRequest.getServerPort ();
|
||||
}
|
||||
|
||||
public override string GetPathInfo () {
|
||||
return base.GetPathInfo () ?? String.Empty;
|
||||
}
|
||||
|
||||
public override string GetQueryString () {
|
||||
return _HttpServletRequest.getQueryString ();
|
||||
}
|
||||
|
||||
public override string GetRemoteAddress () {
|
||||
return _HttpServletRequest.getRemoteAddr ();
|
||||
}
|
||||
|
||||
public override string GetRemoteName () {
|
||||
return _HttpServletRequest.getRemoteHost ();
|
||||
}
|
||||
|
||||
|
||||
public override int GetRemotePort () {
|
||||
try {
|
||||
return _HttpServletRequest.getRemotePort ();
|
||||
}
|
||||
catch (Exception e) {
|
||||
// if servlet API is 2.3 and below - there is no method getRemotePort
|
||||
// in ServletRequest interface... should be described as limitation.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetProtocol () {
|
||||
return _HttpServletRequest.getScheme ();
|
||||
}
|
||||
|
||||
public override string GetServerName () {
|
||||
return _HttpServletRequest.getServerName ();
|
||||
}
|
||||
|
||||
public override bool IsSecure () {
|
||||
return _HttpServletRequest.isSecure ();
|
||||
}
|
||||
|
||||
public override void SendStatus (int statusCode, string statusDescription) {
|
||||
// setStatus(int, string) is deprecated
|
||||
_HttpServletResponse.setStatus (statusCode/*, statusDescription*/);
|
||||
}
|
||||
|
||||
public override void SendUnknownResponseHeader (string name, string value) {
|
||||
if (HeadersSent ())
|
||||
return;
|
||||
|
||||
_HttpServletResponse.addHeader (name, value);
|
||||
}
|
||||
|
||||
public override bool HeadersSent () {
|
||||
return _HttpServletResponse.isCommitted ();
|
||||
}
|
||||
|
||||
public override void SendCalculatedContentLength (int contentLength) {
|
||||
_HttpServletResponse.setContentLength (contentLength);
|
||||
}
|
||||
|
||||
public override string GetAuthType () {
|
||||
return _HttpServletRequest.getAuthType ();
|
||||
}
|
||||
|
||||
protected override int getContentLength () {
|
||||
return _HttpServletRequest.getContentLength ();
|
||||
}
|
||||
|
||||
protected override string getContentType () {
|
||||
return _HttpServletRequest.getContentType ();
|
||||
}
|
||||
|
||||
public override string GetRemoteUser () {
|
||||
return _HttpServletRequest.getRemoteUser ();
|
||||
}
|
||||
|
||||
protected override java.util.Enumeration getHeaderNames () {
|
||||
return _HttpServletRequest.getHeaderNames ();
|
||||
}
|
||||
|
||||
protected override string getHeader (string name) {
|
||||
return _HttpServletRequest.getHeader (name);
|
||||
}
|
||||
|
||||
protected override java.io.InputStream getInputStream () {
|
||||
return _HttpServletRequest.getInputStream ();
|
||||
}
|
||||
|
||||
public override javax.servlet.ServletContext GetContext () {
|
||||
return _HttpServlet.getServletContext ();
|
||||
}
|
||||
|
||||
protected override OutputStreamWrapper CreateOutputStream (bool binary) {
|
||||
return _outputStream ?? (_outputStream = binary ?
|
||||
new OutputStreamWrapper (_HttpServletResponse.getOutputStream ()) :
|
||||
new OutputStreamWrapper (_HttpServletResponse.getWriter ()));
|
||||
}
|
||||
|
||||
public override HttpSession GetSession (bool create) {
|
||||
return _HttpServletRequest.getSession (create);
|
||||
}
|
||||
|
||||
public override bool IsRequestedSessionIdValid () {
|
||||
return _HttpServletRequest.isRequestedSessionIdValid ();
|
||||
}
|
||||
public override string GetRequestedSessionId () {
|
||||
return _HttpServletRequest.getRequestedSessionId ();
|
||||
}
|
||||
|
||||
public override bool IsUserInRole (string name) {
|
||||
return _HttpServletRequest.isUserInRole (name);
|
||||
}
|
||||
|
||||
public override Principal GetUserPrincipal () {
|
||||
return _HttpServletRequest.getUserPrincipal ();
|
||||
}
|
||||
|
||||
public override BaseHttpContext CreateContext (System.Web.HttpContext context) {
|
||||
return new ServletHttpContext (context);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 488 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user